summaryrefslogtreecommitdiff
path: root/target/linux/adm8668
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2012-12-06 22:39:22 +0000
committerFlorian Fainelli <florian@openwrt.org>2012-12-06 22:39:22 +0000
commit50303d52e296a7e80951044dec12c248a456870c (patch)
treeb362452df398bbc071cd96d35ee2a99a0b6f9971 /target/linux/adm8668
parent192c1e90bc8b47b59813e4d383816e0aae7dfe3e (diff)
downloadmtk-20170518-50303d52e296a7e80951044dec12c248a456870c.zip
mtk-20170518-50303d52e296a7e80951044dec12c248a456870c.tar.gz
mtk-20170518-50303d52e296a7e80951044dec12c248a456870c.tar.bz2
use platform_add_devices
Signed-off-by: Florian Fainelli <florian@openwrt.org> SVN-Revision: 34545
Diffstat (limited to 'target/linux/adm8668')
-rw-r--r--target/linux/adm8668/files/arch/mips/adm8668/platform.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/target/linux/adm8668/files/arch/mips/adm8668/platform.c b/target/linux/adm8668/files/arch/mips/adm8668/platform.c
index dc4817f..4c158dd 100644
--- a/target/linux/adm8668/files/arch/mips/adm8668/platform.c
+++ b/target/linux/adm8668/files/arch/mips/adm8668/platform.c
@@ -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);