]> 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)
commitd180b7863860dcbb232c249169dae2f389735bbf
treebae0ba1de5d85d023b0d8ce8157d5f913cfcd9a5
parentf39bb7108cdaeaf8eef9d9c2edd39ff972c8f285
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