Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1414764 > unrolled thread
| Started by | Thierry Reding <thierry.reding@gmail.com> |
|---|---|
| First post | 2016-06-06 10:40 +0200 |
| Last post | 2016-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.
[PATCH 14/22] drm/etnaviv: Use of_device_match() Thierry Reding <thierry.reding@gmail.com> - 2016-06-06 10:40 +0200
| From | Thierry Reding <thierry.reding@gmail.com> |
|---|---|
| Date | 2016-06-06 10:40 +0200 |
| Subject | [PATCH 14/22] drm/etnaviv: Use of_device_match() |
| Message-ID | <rGYeK-2qH-45@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/etnaviv/etnaviv_drv.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_drv.c b/drivers/gpu/drm/etnaviv/etnaviv_drv.c
index 3d4f56df8359..187523110d58 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_drv.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_drv.c
@@ -15,6 +15,7 @@
*/
#include <linux/component.h>
+#include <linux/of_device.h>
#include <linux/of_platform.h>
#include "etnaviv_drv.h"
@@ -606,13 +607,6 @@ static const struct component_master_ops etnaviv_master_ops = {
.unbind = etnaviv_unbind,
};
-static int compare_of(struct device *dev, void *data)
-{
- struct device_node *np = data;
-
- return dev->of_node == np;
-}
-
static int compare_str(struct device *dev, void *data)
{
return !strcmp(dev_name(dev), data);
@@ -635,8 +629,8 @@ static int etnaviv_pdev_probe(struct platform_device *pdev)
if (!core_node)
break;
- component_match_add(&pdev->dev, &match, compare_of,
- core_node);
+ component_match_add(&pdev->dev, &match,
+ of_device_match, core_node);
of_node_put(core_node);
}
} else if (dev->platform_data) {
--
2.8.3
Back to top | Article view | linux.kernel
csiph-web