power: supply: ds2760: Use devm_power_supply_register() helper
authorAndrew Davis <afd@ti.com>
Tue, 23 Jan 2024 16:36:35 +0000 (10:36 -0600)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Sat, 27 Jan 2024 00:23:40 +0000 (01:23 +0100)
commit88a72257a438375894de446885bb40946e0f979f
treec82db9fe04ee06ec316b4a7d63b696416154f445
parent57261cda154b3d0f8671ea222672f75b1e965c15
power: supply: ds2760: Use devm_power_supply_register() helper

Use the device lifecycle managed register function. This helps prevent
mistakes like unregistering out of order in cleanup functions and
forgetting to unregister on error paths.

Signed-off-by: Andrew Davis <afd@ti.com>
Link: https://lore.kernel.org/r/20240123163653.384385-4-afd@ti.com
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/ds2760_battery.c