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/regulator/of_regulator.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/regulator/of_regulator.c')
-rw-r--r-- | drivers/regulator/of_regulator.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c index 397918ebba55..20dcc9c03adc 100644 --- a/drivers/regulator/of_regulator.c +++ b/drivers/regulator/of_regulator.c @@ -460,16 +460,11 @@ error: return NULL; } -static int of_node_match(struct device *dev, const void *data) -{ - return dev->of_node == data; -} - struct regulator_dev *of_find_regulator_by_node(struct device_node *np) { struct device *dev; - dev = class_find_device(®ulator_class, NULL, np, of_node_match); + dev = class_find_device_by_of_node(®ulator_class, np); return dev ? dev_to_rdev(dev) : NULL; } |