OSDN Git Service

power: supply: axp288_fuel_gauge: Use devm_power_supply_register()
authorHans de Goede <hdegoede@redhat.com>
Thu, 6 Jan 2022 11:06:05 +0000 (12:06 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Tue, 1 Feb 2022 13:29:34 +0000 (14:29 +0100)
commitf1b7e0881fe12ebd2d95f55ebf4fcf57566a53b6
treebae0ba1de5d85d023b0d8ce8157d5f913cfcd9a5
parent360108661277a784aacb22913b853e9b0fc4de1c
power: supply: axp288_fuel_gauge: Use devm_power_supply_register()

Use devm_power_supply_register() instead of
power_supply_register().

Note as a side-effect this changes the release order so that now
first the IRQs get free-ed and then the psy gets unregistered.
This is actually a bug-fix since this fixes the IRQ possibly trying
to reference the unregistered psy.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/axp288_fuel_gauge.c