]> git.karo-electronics.de Git - karo-tx-linux.git/commit
power: supply: max8997_charger: Using device managed API and remove OOM print
authorSrikant Ritolia <s.ritolia@samsung.com>
Thu, 8 Dec 2016 09:12:37 +0000 (14:42 +0530)
committerSebastian Reichel <sre@kernel.org>
Wed, 4 Jan 2017 20:59:56 +0000 (21:59 +0100)
commita50b0dbbaf49521cc47a0bcfd20a6f658258541c
tree710a71a43f61933d60132209004199dd909d8b8b
parent50111d3f886ac95cb76aefb6ceb0d1b6e78eefc0
power: supply: max8997_charger: Using device managed API and remove OOM print

Use managed resource function devm_power_supply_register instead of
power_supply_register to simplify the error path by allowing unregistering
to happen automatically on error and remove.
Removing max8997_battery_remove function also as it is now redundant.

Also removing out of memory printk message after kzalloc as there is
already enough information on failure.

Signed-off-by: Srikant Ritolia <s.ritolia@samsung.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
drivers/power/supply/max8997_charger.c