From: Andrew Morton Cc: Nicolas DET Signed-off-by: Andrew Morton --- arch/ppc/platforms/chrp_pegasos_eth.c | 28 +++++++++++++--------------- 1 files changed, 13 insertions(+), 15 deletions(-) diff -puN arch/ppc/platforms/chrp_pegasos_eth.c~chrp_pegasos_eth-added-marvell-discovery-tidy arch/ppc/platforms/chrp_pegasos_eth.c --- 25/arch/ppc/platforms/chrp_pegasos_eth.c~chrp_pegasos_eth-added-marvell-discovery-tidy Fri Oct 14 14:23:43 2005 +++ 25-akpm/arch/ppc/platforms/chrp_pegasos_eth.c Fri Oct 14 14:23:43 2005 @@ -131,8 +131,7 @@ static struct platform_device *mv643xx_e #define MV_READ(offset,val) { val = readl(mv643xx_reg_base + offset); } #define MV_WRITE(offset,data) writel(data, mv643xx_reg_base + offset) -static void __iomem *mv643xx_reg_base = NULL; - +static void __iomem *mv643xx_reg_base; static int Enable_SRAM(void) { @@ -140,13 +139,15 @@ static int Enable_SRAM(void) /* Let's io remap the mv register to touch the SRAM config */ if (mv643xx_reg_base == NULL) - mv643xx_reg_base = ioremap(PEGASOS2_MARVELL_REGBASE, PEGASOS2_MARVELL_REGSIZE); + mv643xx_reg_base = ioremap(PEGASOS2_MARVELL_REGBASE, + PEGASOS2_MARVELL_REGSIZE); if (mv643xx_reg_base == NULL) - return -ENOMEM; + return -ENOMEM; #ifdef BE_VERBOSE - printk("Pegasos II/Marvell MV64361: register remapped from %p to %p\n", (void *)PEGASOS2_MARVELL_REGBASE, (void *)mv643xx_reg_base); + printk("Pegasos II/Marvell MV64361: register remapped from %p to %p\n", + (void *)PEGASOS2_MARVELL_REGBASE, (void *)mv643xx_reg_base); #endif /* @@ -193,8 +194,7 @@ static int Enable_SRAM(void) int mv643xx_eth_add_pds(void) { int ret = 0; - static struct pci_device_id pci_marvell_mv64360[] = - { + static struct pci_device_id pci_marvell_mv64360[] = { { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, PCI_DEVICE_ID_MARVELL_MV64360) }, { } }; @@ -203,12 +203,11 @@ int mv643xx_eth_add_pds(void) printk("Pegasos II/Marvell MV64361: init\n"); #endif - if (pci_dev_present(pci_marvell_mv64360)) - { - ret = platform_add_devices(mv643xx_eth_pd_devs, ARRAY_SIZE(mv643xx_eth_pd_devs)); + if (pci_dev_present(pci_marvell_mv64360)) { + ret = platform_add_devices(mv643xx_eth_pd_devs, + ARRAY_SIZE(mv643xx_eth_pd_devs)); - if ( Enable_SRAM() < 0) - { + if (Enable_SRAM() < 0) { // Humm, disable SRAM stuff eth0_pd.tx_sram_addr = 0; eth0_pd.tx_sram_size = 0; @@ -221,13 +220,13 @@ int mv643xx_eth_add_pds(void) eth1_pd.rx_sram_size = 0; #ifdef BE_VERBOSE - printk("Pegasos II/Marvell MV64361: Can't enable the SRAM\n"); + printk("Pegasos II/Marvell MV64361: Can't enable the " + "SRAM\n"); #endif } } #ifdef BE_VERBOSE - printk("Pegasos II/Marvell MV64361: init is over\n"); #endif @@ -235,4 +234,3 @@ int mv643xx_eth_add_pds(void) } device_initcall(mv643xx_eth_add_pds); - _