diff options
author | Yong Wu <yong.wu@mediatek.com> | 2022-02-14 07:08:17 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-02-25 12:16:13 +0100 |
commit | 5730c81df7a3b26750d9e6b4ae62bcec47ab2375 (patch) | |
tree | 1fb0355cfac0b668106091ba837b828f8d311d6d /drivers/power | |
parent | ASoC: codecs: wcd938x: Make use of the helper component_compare/release_of (diff) | |
download | linux-5730c81df7a3b26750d9e6b4ae62bcec47ab2375.tar.xz linux-5730c81df7a3b26750d9e6b4ae62bcec47ab2375.zip |
power: supply: ab8500: Make use of the helper component_compare_dev
Use the common compare helper from component.
Cc: Sebastian Reichel <sre@kernel.org>
Cc: linux-pm@vger.kernel.org
Signed-off-by: Yong Wu <yong.wu@mediatek.com>
Link: https://lore.kernel.org/r/20220214060819.7334-22-yong.wu@mediatek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/power')
-rw-r--r-- | drivers/power/supply/ab8500_charger.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/power/supply/ab8500_charger.c b/drivers/power/supply/ab8500_charger.c index ce074c018dcb..875fe665f8a8 100644 --- a/drivers/power/supply/ab8500_charger.c +++ b/drivers/power/supply/ab8500_charger.c @@ -3414,11 +3414,6 @@ static struct platform_driver *const ab8500_charger_component_drivers[] = { &ab8500_chargalg_driver, }; -static int ab8500_charger_compare_dev(struct device *dev, void *data) -{ - return dev == data; -} - static int ab8500_charger_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -3657,8 +3652,7 @@ static int ab8500_charger_probe(struct platform_device *pdev) while ((d = platform_find_device_by_driver(p, drv))) { put_device(p); - component_match_add(dev, &match, - ab8500_charger_compare_dev, d); + component_match_add(dev, &match, component_compare_dev, d); p = d; } put_device(p); |