Patchwork [5/5] powerpc/5200: convert mpc5200 to use of_platform_populate()

login
register
mail settings
Submitter Grant Likely
Date June 21, 2011, 6:45 p.m.
Message ID <20110621184513.18176.24174.stgit@ponder>
Download mbox | patch
Permalink /patch/101354/
State Accepted
Delegated to: Anatolij Gustschin
Headers show

Comments

Grant Likely - June 21, 2011, 6:45 p.m.
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>
---
 arch/powerpc/platforms/52xx/mpc52xx_common.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)
Anatolij Gustschin - March 20, 2012, 4:20 p.m.
On Tue, 21 Jun 2011 12:45:13 -0600
Grant Likely <grant.likely@secretlab.ca> wrote:

> 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>
> ---
>  arch/powerpc/platforms/52xx/mpc52xx_common.c |   10 ++++------
>  1 files changed, 4 insertions(+), 6 deletions(-)

Applied for mpc5xxx next, thanks.

Anatolij

Patch

diff --git a/arch/powerpc/platforms/52xx/mpc52xx_common.c b/arch/powerpc/platforms/52xx/mpc52xx_common.c
index 41f3a7e..6a2fde2 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
-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");
 }
 
 /*