[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 6 Jun 2016 10:31:56 +0200
From: Thierry Reding <thierry.reding@...il.com>
To: Rob Herring <robh+dt@...nel.org>,
Frank Rowand <frowand.list@...il.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Russell King <linux@...linux.org.uk>,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 14/22] drm/etnaviv: Use of_device_match()
From: Thierry Reding <treding@...dia.com>
Use the common implementation rather than the driver-private variant.
Signed-off-by: Thierry Reding <treding@...dia.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
Powered by blists - more mailing lists