]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitdc8d40b2e1bd0cf53c954c78f6bac6496a95b411
treebae0ba1de5d85d023b0d8ce8157d5f913cfcd9a5
parent2fcae082efaee34809b10c4976f3bf67f51d76dc
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