[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1559577023-558-11-git-send-email-suzuki.poulose@arm.com>
Date: Mon, 3 Jun 2019 16:49:36 +0100
From: Suzuki K Poulose <suzuki.poulose@....com>
To: linux-kernel@...r.kernel.org
Cc: gregkh@...uxfoundation.org, rafael@...nel.org,
suzuki.poulose@....com,
Mathieu Poirier <mathieu.poirier@...aro.org>
Subject: [RFC PATCH 10/57] drivers: coresight: Use bus_find_device_by_of_node helper
Switch to using the bus_find_device_by_of_node helper
Cc: Mathieu Poirier <mathieu.poirier@...aro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@....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
Powered by blists - more mailing lists