diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 21:00:37 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 21:00:37 +0000 |
commit | 94ac2ab3fff96814d7460a27a0e9d004abbd4128 (patch) | |
tree | 9a4eb8cc234b540b0f4b93363109cdd37a20540b /drivers/power/supply/ds2760_battery.c | |
parent | Adding debian version 6.8.12-1. (diff) | |
download | linux-94ac2ab3fff96814d7460a27a0e9d004abbd4128.tar.xz linux-94ac2ab3fff96814d7460a27a0e9d004abbd4128.zip |
Merging upstream version 6.9.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'drivers/power/supply/ds2760_battery.c')
-rw-r--r-- | drivers/power/supply/ds2760_battery.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/power/supply/ds2760_battery.c b/drivers/power/supply/ds2760_battery.c index 40fba31be1..7cf4ea06b5 100644 --- a/drivers/power/supply/ds2760_battery.c +++ b/drivers/power/supply/ds2760_battery.c @@ -739,7 +739,7 @@ static int w1_ds2760_add_slave(struct w1_slave *sl) if (current_accum) ds2760_battery_set_current_accum(di, current_accum); - di->bat = power_supply_register(dev, &di->bat_desc, &psy_cfg); + di->bat = devm_power_supply_register(dev, &di->bat_desc, &psy_cfg); if (IS_ERR(di->bat)) { dev_err(di->dev, "failed to register battery\n"); retval = PTR_ERR(di->bat); @@ -762,7 +762,6 @@ static int w1_ds2760_add_slave(struct w1_slave *sl) goto success; workqueue_failed: - power_supply_unregister(di->bat); batt_failed: di_alloc_failed: success: @@ -777,7 +776,6 @@ static void w1_ds2760_remove_slave(struct w1_slave *sl) cancel_delayed_work_sync(&di->monitor_work); cancel_delayed_work_sync(&di->set_charged_work); destroy_workqueue(di->monitor_wqueue); - power_supply_unregister(di->bat); } #ifdef CONFIG_OF |