diff options
| author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-07-31 14:19:22 +0100 |
|---|---|---|
| committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-07-31 14:19:22 +0100 |
| commit | f13b1035ce8bbc27d4ce7c281cddd2718f2cf5b0 (patch) | |
| tree | 44419bd03c33e662302dd003f57d36e133144f91 /arch/mips/alchemy/common/platform.c | |
| parent | e910b63d009701ad4ebbeb089aba35707fa5d68e (diff) | |
| parent | 5da3e714e30d40145f4dd37d79de6bbbcb9e6137 (diff) | |
| download | olio-linux-3.10-f13b1035ce8bbc27d4ce7c281cddd2718f2cf5b0.tar.xz olio-linux-3.10-f13b1035ce8bbc27d4ce7c281cddd2718f2cf5b0.zip | |
Merge branch 'shmobile' into devel
Diffstat (limited to 'arch/mips/alchemy/common/platform.c')
| -rw-r--r-- | arch/mips/alchemy/common/platform.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/mips/alchemy/common/platform.c b/arch/mips/alchemy/common/platform.c index 2580e77624d..f9e5622ebc9 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 = { static int __init au1xxx_platform_init(void) { unsigned int uartclk = get_au1x00_uart_baud_base() * 16; - int i; + int err, i; /* Fill up uartclk. */ for (i = 0; au1x00_uart_data[i].flags; i++) au1x00_uart_data[i].uartclk = uartclk; + err = platform_add_devices(au1xxx_platform_devices, + ARRAY_SIZE(au1xxx_platform_devices)); #ifndef CONFIG_SOC_AU1100 /* Register second MAC if enabled in pinfunc */ - if (!(au_readl(SYS_PINFUNC) & (u32)SYS_PF_NI2)) + if (!err && !(au_readl(SYS_PINFUNC) & (u32)SYS_PF_NI2)) platform_device_register(&au1xxx_eth1_device); #endif - return platform_add_devices(au1xxx_platform_devices, - ARRAY_SIZE(au1xxx_platform_devices)); + return err; } arch_initcall(au1xxx_platform_init); |