Re: [PATCH v2] of/platform: Ignore disabled devices in of_platform_populate()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




PING?

On 23/01/17 13:52, Alexander Sverdlin wrote:
> Check the status property and give up early enough. Otherwise
> OF_POPULATED_BUS might be set for disabled bus which will prevent
> it from being populated later (if enabled).
> 
> Signed-off-by: Alexander Sverdlin <alexander.sverdlin@xxxxxxxxx>
> Cc: Rob Herring <robh+dt@xxxxxxxxxx>
> Cc: Frank Rowand <frowand.list@xxxxxxxxx>
> Cc: devicetree@xxxxxxxxxxxxxxx
> ---
>  drivers/of/platform.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/of/platform.c b/drivers/of/platform.c
> index 35de1fc59fa6..060621d94f1a 100644
> --- a/drivers/of/platform.c
> +++ b/drivers/of/platform.c
> @@ -476,6 +476,10 @@ int of_platform_populate(struct device_node *root,
>  	root = root ? of_node_get(root) : of_find_node_by_path("/");
>  	if (!root)
>  		return -EINVAL;
> +	if (!of_device_is_available(root)) {
> +		of_node_put(root);
> +		return 0;
> +	}
>  
>  	pr_debug("%s()\n", __func__);
>  	pr_debug(" starting at: %s\n", root->full_name);

-- 
Best regards,
Alexander Sverdlin.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux