path: root/arch
diff options
authorGrant Likely <grant.likely@secretlab.ca>2011-03-28 21:20:47 -0600
committerGrant Likely <grant.likely@secretlab.ca>2011-03-28 21:20:47 -0600
commit3a1a90a4cf4f0870bb6ee8065092e2c0ea7d72aa (patch)
tree85e5c9271191f8545665e805a009808868961cd2 /arch
parente0ceac7b1e4b89519b8bfd711b128560a5b2deea (diff)
dt: add of_platform_populate() for creating device from the device tree
of_platform_populate() is similar to of_platform_bus_probe() except that it strictly enforces that all device nodes must have a compatible property, and it can be used to register devices (not buses) which are children of the root node. This patch also modifies MPC5200 support to use the new function. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'arch')
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_common.c b/arch/powerpc/platforms/52xx/mpc52xx_common.c
index 41f3a7eda1d..5767a8a1dc7 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_common.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c
@@ -97,13 +97,11 @@ struct mpc52xx_gpio_wkup __iomem *wkup_gpio;
* of the localplus bus to the of_platform
* bus.
-void __init
+void __init mpc52xx_declare_of_platform_devices(void)
- /* Find every child of the SOC node and add it to of_platform */
- if (of_platform_bus_probe(NULL, mpc52xx_bus_ids, NULL))
- printk(KERN_ERR __FILE__ ": "
- "Error while probing of_platform bus\n");
+ /* Find all the 'platform' devices and register them. */
+ if (of_platform_populate(NULL, mpc52xx_bus_ids, NULL))
+ pr_err(__FILE__ ": Error while populating devices from DT\n");