From: Krzysztof Kozlowski Date: Thu, 12 Mar 2015 07:44:20 +0000 (+0100) Subject: arm: mach-pxa: Decrement the power supply's device reference counter X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d3a6097b25e09751cba787b33eba26ab4df86215;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git arm: mach-pxa: Decrement the power supply's device reference counter Use power_supply_put() to decrement the power supply's device reference counter. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Bartlomiej Zolnierkiewicz Reviewed-by: Sebastian Reichel Acked-by: Robert Jarzmik Acked-by: Pavel Machek Signed-off-by: Sebastian Reichel --- diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c index a762b23ac830..6dc4f025e674 100644 --- a/arch/arm/mach-pxa/raumfeld.c +++ b/arch/arm/mach-pxa/raumfeld.c @@ -758,8 +758,10 @@ static void raumfeld_power_signal_charged(void) struct power_supply *psy = power_supply_get_by_name(raumfeld_power_supplicants[0]); - if (psy) + if (psy) { power_supply_set_battery_charged(psy); + power_supply_put(psy); + } } static int raumfeld_power_resume(void)