From: Andrzej Hajda Date: Fri, 28 Mar 2014 11:52:37 +0000 (+0100) Subject: drm/mipi_dsi: create dsi devices only for nodes with reg property X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e49640da76b5e143b809720bff8f35ad5f2d8cc6;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/mipi_dsi: create dsi devices only for nodes with reg property MIPI DSI host node can contain child nodes which are not DSI devices. Checking for existence of reg property can be used to distinguish such nodes. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae --- diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c index b155ee2ffa17..09821f46d768 100644 --- a/drivers/gpu/drm/drm_mipi_dsi.c +++ b/drivers/gpu/drm/drm_mipi_dsi.c @@ -142,8 +142,12 @@ int mipi_dsi_host_register(struct mipi_dsi_host *host) { struct device_node *node; - for_each_available_child_of_node(host->dev->of_node, node) + for_each_available_child_of_node(host->dev->of_node, node) { + /* skip nodes without reg property */ + if (!of_find_property(node, "reg", NULL)) + continue; of_mipi_dsi_device_add(host, node); + } return 0; }