Skip to content
Commit e55a5061 authored by Iskren Chernev's avatar Iskren Chernev Committed by Sebastian Reichel
Browse files

power: supply: max17040: Use devm_ to automate remove



Two actions were performed during remove - power supply dereg and
delayed work cleanup. Power supply dereg can be handled by using the
devm_ version of the registration function. Work cleanup can be added as
a devm_action.

If probe fails after psy registration it will now be cleaned up
properly.

Signed-off-by: default avatarIskren Chernev <iskren.chernev@gmail.com>
Tested-by: default avatarJonathan Bakker <xc-racer2@live.ca>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent 05f94eb9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment