diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-09-03 17:11:07 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-09-03 17:11:07 +0200 |
commit | c5c0283a9db1c7ba5881f956a1faf2ebc3dfe70e (patch) | |
tree | a4d44768f1591f40374c87eea9a28df8faccc103 /drivers/mfd | |
parent | a31f01777bc54a0a9d57628956d05f8d454d3418 (diff) | |
parent | 36f3313d6bff91ab2a9e47698c27d15363640a4e (diff) | |
download | linux-c5c0283a9db1c7ba5881f956a1faf2ebc3dfe70e.tar.bz2 |
Merge generic_lookup_helpers into usb-next
The lookup helpers are needed here.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/altera-sysmgr.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/mfd/altera-sysmgr.c b/drivers/mfd/altera-sysmgr.c index 2ee14d8a6d31..d2a13a547a3c 100644 --- a/drivers/mfd/altera-sysmgr.c +++ b/drivers/mfd/altera-sysmgr.c @@ -88,16 +88,6 @@ static struct regmap_config altr_sysmgr_regmap_cfg = { }; /** - * sysmgr_match_phandle - * Matching function used by driver_find_device(). - * Return: True if match is found, otherwise false. - */ -static int sysmgr_match_phandle(struct device *dev, const void *data) -{ - return dev->of_node == (const struct device_node *)data; -} - -/** * altr_sysmgr_regmap_lookup_by_phandle * Find the sysmgr previous configured in probe() and return regmap property. * Return: regmap if found or error if not found. @@ -117,8 +107,8 @@ struct regmap *altr_sysmgr_regmap_lookup_by_phandle(struct device_node *np, if (!sysmgr_np) return ERR_PTR(-ENODEV); - dev = driver_find_device(&altr_sysmgr_driver.driver, NULL, - (void *)sysmgr_np, sysmgr_match_phandle); + dev = driver_find_device_by_of_node(&altr_sysmgr_driver.driver, + (void *)sysmgr_np); of_node_put(sysmgr_np); if (!dev) return ERR_PTR(-EPROBE_DEFER); |