diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-07 13:11:22 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-07 13:11:22 +0000 |
commit | b20732900e4636a467c0183a47f7396700f5f743 (patch) | |
tree | 42f079ff82e701ebcb76829974b4caca3e5b6798 /drivers/power/supply/max14577_charger.c | |
parent | Adding upstream version 6.8.12. (diff) | |
download | linux-b20732900e4636a467c0183a47f7396700f5f743.tar.xz linux-b20732900e4636a467c0183a47f7396700f5f743.zip |
Adding upstream version 6.9.7.upstream/6.9.7
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | drivers/power/supply/max14577_charger.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/power/supply/max14577_charger.c b/drivers/power/supply/max14577_charger.c index 7c23fa89ea..b28c041577 100644 --- a/drivers/power/supply/max14577_charger.c +++ b/drivers/power/supply/max14577_charger.c @@ -586,8 +586,9 @@ static int max14577_charger_probe(struct platform_device *pdev) } psy_cfg.drv_data = chg; - chg->charger = power_supply_register(&pdev->dev, &max14577_charger_desc, - &psy_cfg); + chg->charger = devm_power_supply_register(&pdev->dev, + &max14577_charger_desc, + &psy_cfg); if (IS_ERR(chg->charger)) { dev_err(&pdev->dev, "failed: power supply register\n"); ret = PTR_ERR(chg->charger); @@ -608,10 +609,7 @@ err: static void max14577_charger_remove(struct platform_device *pdev) { - struct max14577_charger *chg = platform_get_drvdata(pdev); - device_remove_file(&pdev->dev, &dev_attr_fast_charge_timer); - power_supply_unregister(chg->charger); } static const struct platform_device_id max14577_charger_id[] = { |