lkml.org 
[lkml]   [2019]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH 10/57] drivers: coresight: Use bus_find_device_by_of_node helper
Date
Switch to using the bus_find_device_by_of_node helper

Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
---
drivers/hwtracing/coresight/of_coresight.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/drivers/hwtracing/coresight/of_coresight.c b/drivers/hwtracing/coresight/of_coresight.c
index 7045930..9b7a0c0 100644
--- a/drivers/hwtracing/coresight/of_coresight.c
+++ b/drivers/hwtracing/coresight/of_coresight.c
@@ -18,11 +18,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)
{
@@ -32,8 +27,7 @@ of_coresight_get_endpoint_device(struct device_node *endpoint)
* If we have a non-configurable replicator, it will be found on the
* platform bus.
*/
- dev = bus_find_device(&platform_bus_type, NULL,
- endpoint, of_dev_node_match);
+ dev = bus_find_device_by_of_node(&platform_bus_type, NULL, endpoint);
if (dev)
return dev;

@@ -41,8 +35,7 @@ of_coresight_get_endpoint_device(struct device_node *endpoint)
* We have a configurable component - circle through the AMBA bus
* looking for the device that matches the endpoint node.
*/
- return bus_find_device(&amba_bustype, NULL,
- endpoint, of_dev_node_match);
+ return bus_find_device_by_of_node(&amba_bustype, NULL, endpoint);
}

static inline bool of_coresight_legacy_ep_is_input(struct device_node *ep)
--
2.7.4
\
 
 \ /
  Last update: 2019-06-03 17:51    [W:0.043 / U:0.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site