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

Grant Likely grant.likely at secretlab.ca
Thu Feb 17 11:24:41 EST 2011


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 at 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.



More information about the devicetree-discuss mailing list