diff mbox

[6/7] ARM: s5pv310-dt: Enable snooping of platform_device registrations

Message ID 1297514825-10345-7-git-send-email-thomas.abraham@linaro.org
State New
Headers show

Commit Message

thomas.abraham@linaro.org Feb. 12, 2011, 12:47 p.m. UTC
Enable snooping of platform_device registrations for s5pv310-dt machine.

Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
---
 arch/arm/mach-s5pv310/mach-s5pv310-dt.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Comments

Grant Likely Feb. 17, 2011, 12:24 a.m. UTC | #1
On Sat, Feb 12, 2011 at 06:17:04PM +0530, Thomas Abraham wrote:
> Enable snooping of platform_device registrations for s5pv310-dt machine.
> 
> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
> ---
>  arch/arm/mach-s5pv310/mach-s5pv310-dt.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-s5pv310/mach-s5pv310-dt.c b/arch/arm/mach-s5pv310/mach-s5pv310-dt.c
> index 2578d73..ed5cae4 100644
> --- a/arch/arm/mach-s5pv310/mach-s5pv310-dt.c
> +++ b/arch/arm/mach-s5pv310/mach-s5pv310-dt.c
> @@ -64,6 +64,7 @@ static struct of_device_id s5pv310_dt_match_table[] __initdata = {
>  
>  static void __init s5pv310_dt_machine_init(void)
>  {
> +	of_platform_bus_snoop(NULL, s5pv310_dt_match_table);
>  	of_platform_bus_probe(NULL, s5pv310_dt_match_table, NULL);

of_platform_bus_snoop shouldn't be used with of_platform_bus_probe
because it might cause devices to get registered twice.
of_platform_bus_snoop_finish() should be used instead.  It will
register any devices found by snoop that don't have an associated
platform_device, but you need to arrange for
of_platform_bus_snoop_finish() to be called after all other platform
devices have been registered.

g.
diff mbox

Patch

diff --git a/arch/arm/mach-s5pv310/mach-s5pv310-dt.c b/arch/arm/mach-s5pv310/mach-s5pv310-dt.c
index 2578d73..ed5cae4 100644
--- a/arch/arm/mach-s5pv310/mach-s5pv310-dt.c
+++ b/arch/arm/mach-s5pv310/mach-s5pv310-dt.c
@@ -64,6 +64,7 @@  static struct of_device_id s5pv310_dt_match_table[] __initdata = {
 
 static void __init s5pv310_dt_machine_init(void)
 {
+	of_platform_bus_snoop(NULL, s5pv310_dt_match_table);
 	of_platform_bus_probe(NULL, s5pv310_dt_match_table, NULL);
 }