power: supply: max14577: Use devm_power_supply_register() helper
authorAndrew Davis <afd@ti.com>
Mon, 29 Jan 2024 19:02:43 +0000 (13:02 -0600)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Thu, 1 Feb 2024 21:48:54 +0000 (22:48 +0100)
commit99ae075684be3a84a9c20d9541259221d2c01fc8
tree6970b6a362cd7ff0787b4dd2be05cce66f1b1adf
parent4c5d387d79a65355b73e526cbf5754a9dcd5377b
power: supply: max14577: 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/20240129190246.73067-2-afd@ti.com
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/max14577_charger.c