powerpc/5200: convert mpc5200 to use of_platform_populate()
authorGrant Likely <grant.likely@secretlab.ca>
Tue, 21 Jun 2011 08:45:13 +0000 (08:45 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 20 Mar 2012 23:40:31 +0000 (10:40 +1100)
of_platform_populate() also handles nodes at the root of the tree,
which is wanted for things like describing the sound complex.  This
patch converts mpc5200 support to use of_platform_populate() instead
of of_platform_bus_probe().

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
arch/powerpc/platforms/52xx/mpc52xx_common.c

index 369fd5457a3f2edc13dba2072be8e8384f3e6489..d7e94f49532a156f78f3fc2da2d98b73e60c0554 100644 (file)
@@ -98,13 +98,11 @@ struct mpc52xx_gpio_wkup __iomem *wkup_gpio;
  *                                     of the localplus bus to the of_platform
  *                                     bus.
  */
-void __init
-mpc52xx_declare_of_platform_devices(void)
+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, NULL))
+               pr_err(__FILE__ ": Error while populating devices from DT\n");
 }
 
 /*