diff options
author | Jacek Anaszewski <jacek.anaszewski@gmail.com> | 2019-07-30 22:36:31 +0200 |
---|---|---|
committer | Jacek Anaszewski <jacek.anaszewski@gmail.com> | 2019-07-30 22:36:31 +0200 |
commit | be7fc2cc86170bea31e1db8d596f35df52254971 (patch) | |
tree | 31ca140aec74decbf18dfce1a7869aeeb8dcbf84 /drivers/base/devcon.c | |
parent | leds: netxbig: Add of_node_put() in netxbig_leds_get_of_pdata() (diff) | |
parent | platform: Add platform_find_device_by_driver() helper (diff) | |
download | linux-dev-be7fc2cc86170bea31e1db8d596f35df52254971.tar.xz linux-dev-be7fc2cc86170bea31e1db8d596f35df52254971.zip |
Merge tag 'generic_lookup_helpers' into for-next
Generic Device Lookup Helpers
Persistent tag for others to pull this branch from
Based on patch series from Suzuki K Poulose <suzuki.poulose@arm.com>
with Subject: [PATCH v3 0/7] drivers: Add generic device lookup helpers
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tag 'generic_lookup_helpers':
platform: Add platform_find_device_by_driver() helper
drivers: Add generic helper to match any device
drivers: Introduce device lookup variants by ACPI_COMPANION device
drivers: Introduce device lookup variants by device type
drivers: Introduce device lookup variants by fwnode
drivers: Introduce device lookup variants by of_node
drivers: Introduce device lookup variants by name
Diffstat (limited to 'drivers/base/devcon.c')
-rw-r--r-- | drivers/base/devcon.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/base/devcon.c b/drivers/base/devcon.c index 09f28479b243..1d488dc5dd0c 100644 --- a/drivers/base/devcon.c +++ b/drivers/base/devcon.c @@ -133,19 +133,13 @@ static struct bus_type *generic_match_buses[] = { NULL, }; -static int device_fwnode_match(struct device *dev, const 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, con->fwnode); if (dev && !strncmp(dev_name(dev), con->id, strlen(con->id))) return dev; |