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/da9030_battery.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 'drivers/power/supply/da9030_battery.c')
-rw-r--r-- | drivers/power/supply/da9030_battery.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/power/supply/da9030_battery.c b/drivers/power/supply/da9030_battery.c index 581cf956d2..04e0f4162d 100644 --- a/drivers/power/supply/da9030_battery.c +++ b/drivers/power/supply/da9030_battery.c @@ -530,8 +530,9 @@ static int da9030_battery_probe(struct platform_device *pdev) da9030_battery_setup_psy(charger); psy_cfg.drv_data = charger; - charger->psy = power_supply_register(&pdev->dev, &charger->psy_desc, - &psy_cfg); + charger->psy = devm_power_supply_register(&pdev->dev, + &charger->psy_desc, + &psy_cfg); if (IS_ERR(charger->psy)) { ret = PTR_ERR(charger->psy); goto err_ps_register; @@ -563,7 +564,6 @@ static void da9030_battery_remove(struct platform_device *dev) DA9030_EVENT_CHIOVER | DA9030_EVENT_TBAT); cancel_delayed_work_sync(&charger->work); da9030_set_charge(charger, 0); - power_supply_unregister(charger->psy); } static struct platform_driver da903x_battery_driver = { |