Skip to content

Commit 5730c81

Browse files
YongWu-HFgregkh
authored andcommitted
power: supply: ab8500: Make use of the helper component_compare_dev
Use the common compare helper from component. Cc: Sebastian Reichel <[email protected]> Cc: [email protected] Signed-off-by: Yong Wu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent a8271d7 commit 5730c81

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

drivers/power/supply/ab8500_charger.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3414,11 +3414,6 @@ static struct platform_driver *const ab8500_charger_component_drivers[] = {
34143414
&ab8500_chargalg_driver,
34153415
};
34163416

3417-
static int ab8500_charger_compare_dev(struct device *dev, void *data)
3418-
{
3419-
return dev == data;
3420-
}
3421-
34223417
static int ab8500_charger_probe(struct platform_device *pdev)
34233418
{
34243419
struct device *dev = &pdev->dev;
@@ -3657,8 +3652,7 @@ static int ab8500_charger_probe(struct platform_device *pdev)
36573652

36583653
while ((d = platform_find_device_by_driver(p, drv))) {
36593654
put_device(p);
3660-
component_match_add(dev, &match,
3661-
ab8500_charger_compare_dev, d);
3655+
component_match_add(dev, &match, component_compare_dev, d);
36623656
p = d;
36633657
}
36643658
put_device(p);

0 commit comments

Comments
 (0)