power: supply: axp288_charger: Use devm_power_supply_register
authorHans de Goede <hdegoede@redhat.com>
Wed, 21 Dec 2016 14:36:48 +0000 (15:36 +0100)
committerSebastian Reichel <sre@kernel.org>
Wed, 4 Jan 2017 21:02:31 +0000 (22:02 +0100)
commite3668e37f9078ccc1e938b9ddfc112877bbcf60a
tree8df1bf7b03c23f06ddc18c36909a2820b109f55c
parent8bb17b6c83281b32adb063aa1baca2d531731edb
power: supply: axp288_charger: Use devm_power_supply_register

Use devm_power_supply_register instead of power_supply_register,
this avoids the need to do manual cleanup and results in quite
a nice code cleanup.

Note it may seem excessive to add a "struct device *dev" helper local
variable for the 1 time it is used in this patch, but future patches
in this series also use it.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
drivers/power/supply/axp288_charger.c