Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1414752
| From | Thierry Reding <thierry.reding@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 03/22] coresight: Use of_device_match() |
| Date | 2016-06-06 10:40 +0200 |
| Message-ID | <rGYeK-2qH-15@gated-at.bofh.it> (permalink) |
| References | <rGYeJ-2qH-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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/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
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 03/22] coresight: Use of_device_match() Thierry Reding <thierry.reding@gmail.com> - 2016-06-06 10:40 +0200
csiph-web