[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1559577023-558-15-git-send-email-suzuki.poulose@arm.com>
Date: Mon, 3 Jun 2019 16:49:40 +0100
From: Suzuki K Poulose <suzuki.poulose@....com>
To: linux-kernel@...r.kernel.org
Cc: gregkh@...uxfoundation.org, rafael@...nel.org,
suzuki.poulose@....com
Subject: [RFC PATCH 14/57] drivers: devcon: Use bus_find_device_by_fwnode helper
Switch to using the bus_find_device_by_fwnode helper
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@....com>
---
drivers/base/devcon.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/base/devcon.c b/drivers/base/devcon.c
index 04db9ae..d9bcf77 100644
--- a/drivers/base/devcon.c
+++ b/drivers/base/devcon.c
@@ -107,19 +107,13 @@ static struct bus_type *generic_match_buses[] = {
NULL,
};
-static int device_fwnode_match(struct device *dev, void *fwnode)
-{
- return dev_fwnode(dev) == fwnode;
-}
-
static void *device_connection_fwnode_match(struct device_connection *con)
{
struct bus_type *bus;
struct device *dev;
for (bus = generic_match_buses[0]; bus; bus++) {
- dev = bus_find_device(bus, NULL, (void *)con->fwnode,
- device_fwnode_match);
+ dev = bus_find_device_by_fwnode(bus, NULL, con->fwnode);
if (dev && !strncmp(dev_name(dev), con->id, strlen(con->id)))
return dev;
--
2.7.4
Powered by blists - more mailing lists