use platform_add_devices
authorFlorian Fainelli <florian@openwrt.org>
Thu, 6 Dec 2012 22:39:22 +0000 (22:39 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Thu, 6 Dec 2012 22:39:22 +0000 (22:39 +0000)
Signed-off-by: Florian Fainelli <florian@openwrt.org>
SVN-Revision: 34545

target/linux/adm8668/files/arch/mips/adm8668/platform.c

index dc4817f19170551e784e6c98944db410c3d5fde3..4c158dd74963c42b01903dac770d6231e1a611fb 100644 (file)
@@ -77,12 +77,14 @@ static struct platform_device adm8668_eth1_device = {
        .num_resources  = ARRAY_SIZE(eth1_resources),
 };
 
+static struct platform_device *adm8668_devs[] = {
+       &adm8668_uart_device,
+       &adm8668_eth0_device,
+       &adm8668_eth1_device,
+};
+
 int __devinit adm8668_devs_register(void)
 {
-       platform_device_register(&adm8668_uart_device);
-       platform_device_register(&adm8668_eth0_device);
-       platform_device_register(&adm8668_eth1_device);
-
-       return 0;
+       return platform_add_devices(adm8668_devs, ARRAY_SIZE(adm8668_devs));
 }
 arch_initcall(adm8668_devs_register);