power: supply: cw2015: Use device managed API to simplify the code
authorZheyu Ma <zheyuma97@gmail.com>
Sun, 17 Jul 2022 02:58:20 +0000 (10:58 +0800)
committerSebastian Reichel <sre@kernel.org>
Sun, 11 Sep 2022 10:09:10 +0000 (12:09 +0200)
commit0cb172a4918e0b180400c3e1b2894641703eab6d
tree6e30f329060d481f00f916b0c54e84e5f7310b73
parentda7dc6a7a95ef00ff38e7c1873efa79bfec93de4
power: supply: cw2015: Use device managed API to simplify the code

Use devm_delayed_work_autocancel() instead of the INIT_DELAYED_WORK() to
remove the cw_bat_remove() function.

And power_supply_put_battery_info() can also be removed because the
power_supply_get_battery_info() uses device managed memory allocation.

Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/cw2015_battery.c