drm/mipi_dsi: create dsi devices only for nodes with reg property
authorAndrzej Hajda <a.hajda@samsung.com>
Fri, 28 Mar 2014 11:52:37 +0000 (12:52 +0100)
committerInki Dae <daeinki@gmail.com>
Fri, 4 Apr 2014 12:24:47 +0000 (21:24 +0900)
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 <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/drm_mipi_dsi.c

index b155ee2ffa17a44452b1c80d71b8cc7483a527ec..09821f46d768dae2ab019898e6036da32aa0a279 100644 (file)
@@ -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;
 }
This page took 0.030891 seconds and 5 git commands to generate.