summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAndrzej Hajda <a.hajda@samsung.com>2014-03-28 12:52:37 +0100
committerInki Dae <inki.dae@samsung.com>2014-04-28 21:33:32 +0900
commitdf27201882ab2cb19e2770cfb6b5256c0a1ae735 (patch)
tree1db2ac857a6b40fd18d0ab9a3a1b3ab6634e0ef3 /drivers
parent6afbdb70228e257dacc1b63788ee3db147ea9ae4 (diff)
downloadlinux-3.10-df27201882ab2cb19e2770cfb6b5256c0a1ae735.tar.gz
linux-3.10-df27201882ab2cb19e2770cfb6b5256c0a1ae735.tar.bz2
linux-3.10-df27201882ab2cb19e2770cfb6b5256c0a1ae735.zip
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 <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/drm_mipi_dsi.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c
index b155ee2ffa1..09821f46d76 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;
}