power: supply: rx51: Use devm_power_supply_register() helper
authorAndrew Davis <afd@ti.com>
Tue, 23 Jan 2024 16:36:51 +0000 (10:36 -0600)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Sat, 27 Jan 2024 00:25:05 +0000 (01:25 +0100)
commit4cb372a0ca220fff4a3878c4d1239af3e057e7cc
treee9873bce489db504fac01adb15e35e5f1a972169
parenta16dc57e97558dcff7c422b3abec4f9880e8272b
power: supply: rx51: 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-20-afd@ti.com
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/rx51_battery.c