Thread (25 messages) flat view 25 messages, 2 authors, 2016-06-06
STALE3751d

[PATCH 20/22] drm/sun4i: Use of_device_match()

From: Thierry Reding <hidden>
Date: 2016-06-06 08:34:30
Also in: lkml
Subsystem: drm drivers, drm drivers and misc gpu patches, drm drivers for allwinner a10, the rest · Maintainers: David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Chen-Yu Tsai, Linus Torvalds

From: Thierry Reding <redacted>

Use the common implementation instead of the driver-private variant.

Signed-off-by: Thierry Reding <redacted>
---
 drivers/gpu/drm/sun4i/sun4i_drv.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c
index 257d2b4f3645..6a61d9c8afa1 100644
--- a/drivers/gpu/drm/sun4i/sun4i_drv.c
+++ b/drivers/gpu/drm/sun4i/sun4i_drv.c
@@ -11,6 +11,7 @@
  */
 
 #include <linux/component.h>
+#include <linux/of_device.h>
 #include <linux/of_graph.h>
 
 #include <drm/drmP.h>
@@ -219,15 +220,6 @@ static bool sun4i_drv_node_is_tcon(struct device_node *node)
 	return of_device_is_compatible(node, "allwinner,sun5i-a13-tcon");
 }
 
-static int compare_of(struct device *dev, void *data)
-{
-	DRM_DEBUG_DRIVER("Comparing of node %s with %s\n",
-			 of_node_full_name(dev->of_node),
-			 of_node_full_name(data));
-
-	return dev->of_node == data;
-}
-
 static int sun4i_drv_add_endpoints(struct device *dev,
 				   struct component_match **match,
 				   struct device_node *node)
@@ -248,7 +240,7 @@ static int sun4i_drv_add_endpoints(struct device *dev,
 		/* Add current component */
 		DRM_DEBUG_DRIVER("Adding component %s\n",
 				 of_node_full_name(node));
-		component_match_add(dev, match, compare_of, node);
+		component_match_add(dev, match, of_device_match, node);
 		count++;
 	}
 
-- 
2.8.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help