Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1414751 > unrolled thread

[PATCH 13/22] drm/armada: Use of_device_match()

Started byThierry Reding <thierry.reding@gmail.com>
First post2016-06-06 10:40 +0200
Last post2016-06-06 10:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 13/22] drm/armada: Use of_device_match() Thierry Reding <thierry.reding@gmail.com> - 2016-06-06 10:40 +0200

#1414751 — [PATCH 13/22] drm/armada: Use of_device_match()

FromThierry Reding <thierry.reding@gmail.com>
Date2016-06-06 10:40 +0200
Subject[PATCH 13/22] drm/armada: Use of_device_match()
Message-ID<rGYeJ-2qH-13@gated-at.bofh.it>
From: Thierry Reding <treding@nvidia.com>

Use the common implementation rather than the driver-private variant.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 drivers/gpu/drm/armada/armada_drv.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/armada/armada_drv.c b/drivers/gpu/drm/armada/armada_drv.c
index 6ca2aa36515e..c86807187183 100644
--- a/drivers/gpu/drm/armada/armada_drv.c
+++ b/drivers/gpu/drm/armada/armada_drv.c
@@ -8,6 +8,7 @@
 #include <linux/clk.h>
 #include <linux/component.h>
 #include <linux/module.h>
+#include <linux/of_device.h>
 #include <linux/of_graph.h>
 #include <drm/drmP.h>
 #include <drm/drm_crtc_helper.h>
@@ -227,11 +228,6 @@ static void armada_drm_unbind(struct device *dev)
 	drm_put_dev(dev_get_drvdata(dev));
 }
 
-static int compare_of(struct device *dev, void *data)
-{
-	return dev->of_node == data;
-}
-
 static void release_of(struct device *dev, void *data)
 {
 	of_node_put(data);
@@ -261,7 +257,7 @@ static void armada_add_endpoints(struct device *dev,
 		}
 
 		component_match_add_release(dev, match, release_of,
-					    compare_of, remote);
+					    of_device_match, remote);
 	}
 }
 
-- 
2.8.3

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web