aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/alchemy/common/platform.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/mips/alchemy/common/platform.c b/arch/mips/alchemy/common/platform.c
index 2580e77624d2..f9e5622ebc95 100644
--- a/arch/mips/alchemy/common/platform.c
+++ b/arch/mips/alchemy/common/platform.c
@@ -435,20 +435,21 @@ static struct platform_device *au1xxx_platform_devices[] __initdata = {
435static int __init au1xxx_platform_init(void) 435static int __init au1xxx_platform_init(void)
436{ 436{
437 unsigned int uartclk = get_au1x00_uart_baud_base() * 16; 437 unsigned int uartclk = get_au1x00_uart_baud_base() * 16;
438 int i; 438 int err, i;
439 439
440 /* Fill up uartclk. */ 440 /* Fill up uartclk. */
441 for (i = 0; au1x00_uart_data[i].flags; i++) 441 for (i = 0; au1x00_uart_data[i].flags; i++)
442 au1x00_uart_data[i].uartclk = uartclk; 442 au1x00_uart_data[i].uartclk = uartclk;
443 443
444 err = platform_add_devices(au1xxx_platform_devices,
445 ARRAY_SIZE(au1xxx_platform_devices));
444#ifndef CONFIG_SOC_AU1100 446#ifndef CONFIG_SOC_AU1100
445 /* Register second MAC if enabled in pinfunc */ 447 /* Register second MAC if enabled in pinfunc */
446 if (!(au_readl(SYS_PINFUNC) & (u32)SYS_PF_NI2)) 448 if (!err && !(au_readl(SYS_PINFUNC) & (u32)SYS_PF_NI2))
447 platform_device_register(&au1xxx_eth1_device); 449 platform_device_register(&au1xxx_eth1_device);
448#endif 450#endif
449 451
450 return platform_add_devices(au1xxx_platform_devices, 452 return err;
451 ARRAY_SIZE(au1xxx_platform_devices));
452} 453}
453 454
454arch_initcall(au1xxx_platform_init); 455arch_initcall(au1xxx_platform_init);