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/nvmem/core.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/nvmem/core.c')
-rw-r--r-- | drivers/nvmem/core.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index ac5d945be88a..057d1ff87d5d 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -76,11 +76,6 @@ static struct bus_type nvmem_bus_type = { .name = "nvmem", }; -static int of_nvmem_match(struct device *dev, const void *nvmem_np) -{ - return dev->of_node == nvmem_np; -} - static struct nvmem_device *of_nvmem_find(struct device_node *nvmem_np) { struct device *d; @@ -88,7 +83,7 @@ static struct nvmem_device *of_nvmem_find(struct device_node *nvmem_np) if (!nvmem_np) return NULL; - d = bus_find_device(&nvmem_bus_type, NULL, nvmem_np, of_nvmem_match); + d = bus_find_device_by_of_node(&nvmem_bus_type, nvmem_np); if (!d) return NULL; |