[PATCH v4 1/4] dt: check root nodes for match on of_platform_populate

Arnd Bergmann arnd at arndb.de
Sat Jun 11 07:06:48 EST 2011


On Friday 10 June 2011 22:48:40 Rob Herring wrote:
> diff --git a/drivers/of/platform.c b/drivers/of/platform.c
> index 9b785be..dc56a77 100644
> --- a/drivers/of/platform.c
> +++ b/drivers/of/platform.c
> @@ -318,6 +318,8 @@ int of_platform_populate(struct device_node *root,
>                 return -EINVAL;
>  
>         for_each_child_of_node(root, child) {
> +               if (!of_match_node(matches, child))
> +                       continue;
>                 rc = of_platform_bus_create(child, matches, parent, true);
>                 if (rc)
>                         break;


Why doesn't of_platform_populate just call of_platform_bus_create on the
root node? That should normally take care of matching all children.

	Arnd


More information about the devicetree-discuss mailing list