From: Thierry Reding <[email protected]>

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

Signed-off-by: Thierry Reding <[email protected]>
---
 drivers/hwtracing/coresight/of_coresight.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/hwtracing/coresight/of_coresight.c 
b/drivers/hwtracing/coresight/of_coresight.c
index b68da1888fd5..ba438d527d5e 100644
--- a/drivers/hwtracing/coresight/of_coresight.c
+++ b/drivers/hwtracing/coresight/of_coresight.c
@@ -16,6 +16,7 @@
 #include <linux/clk.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
+#include <linux/of_device.h>
 #include <linux/of_graph.h>
 #include <linux/of_platform.h>
 #include <linux/platform_device.h>
@@ -25,11 +26,6 @@
 #include <asm/smp_plat.h>
 
 
-static int of_dev_node_match(struct device *dev, void *data)
-{
-       return dev->of_node == data;
-}
-
 static struct device *
 of_coresight_get_endpoint_device(struct device_node *endpoint)
 {
@@ -40,7 +36,7 @@ of_coresight_get_endpoint_device(struct device_node *endpoint)
         * platform bus.
         */
        dev = bus_find_device(&platform_bus_type, NULL,
-                             endpoint, of_dev_node_match);
+                             endpoint, of_device_match);
        if (dev)
                return dev;
 
@@ -49,7 +45,7 @@ of_coresight_get_endpoint_device(struct device_node *endpoint)
         * looking for the device that matches the endpoint node.
         */
        return bus_find_device(&amba_bustype, NULL,
-                              endpoint, of_dev_node_match);
+                              endpoint, of_device_match);
 }
 
 static void of_coresight_get_ports(struct device_node *node,
-- 
2.8.3

Reply via email to