Messages in this thread Patch in this message | | | From | Suzuki K Poulose <> | Subject | [RFC PATCH 14/57] drivers: devcon: Use bus_find_device_by_fwnode helper | Date | Mon, 3 Jun 2019 16:49:40 +0100 |
| |
Switch to using the bus_find_device_by_fwnode helper
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: "Rafael J. Wysocki" <rafael@kernel.org> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.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
| |