Skip to content
Commit 0cb172a4 authored by Zheyu Ma's avatar Zheyu Ma Committed by Sebastian Reichel
Browse files

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: default avatarZheyu Ma <zheyuma97@gmail.com>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent da7dc6a7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment