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


Groups > linux.kernel > #1414755 > unrolled thread

[PATCH 17/22] drm/msm: 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 17/22] drm/msm: Use of_device_match() Thierry Reding <thierry.reding@gmail.com> - 2016-06-06 10:40 +0200

#1414755 — [PATCH 17/22] drm/msm: Use of_device_match()

FromThierry Reding <thierry.reding@gmail.com>
Date2016-06-06 10:40 +0200
Subject[PATCH 17/22] drm/msm: Use of_device_match()
Message-ID<rGYeK-2qH-29@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/msm/msm_drv.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
index 1f7de47d817e..554d0b4f1e9b 100644
--- a/drivers/gpu/drm/msm/msm_drv.c
+++ b/drivers/gpu/drm/msm/msm_drv.c
@@ -15,6 +15,8 @@
  * this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <linux/of_device.h>
+
 #include "msm_drv.h"
 #include "msm_debugfs.h"
 #include "msm_fence.h"
@@ -796,15 +798,6 @@ static const struct dev_pm_ops msm_pm_ops = {
  * Componentized driver support:
  */
 
-/*
- * NOTE: duplication of the same code as exynos or imx (or probably any other).
- * so probably some room for some helpers
- */
-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);
@@ -824,7 +817,7 @@ static int add_components(struct device *dev, struct component_match **matchptr,
 			break;
 
 		component_match_add_release(dev, matchptr, release_of,
-					    compare_of, node);
+					    of_device_match, node);
 	}
 
 	return 0;
-- 
2.8.3

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web