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>
Showing
Please register or sign in to comment