Thread (31 messages) 31 messages, 5 authors, 2015-02-11

[PATCH v3 19/20] mfd: ab8500: Decrement the power supply's device reference counter

From: Krzysztof Kozlowski <hidden>
Date: 2015-01-30 14:52:26
Also in: linux-acpi, linux-arm-kernel, linux-pm, linux-tegra, lkml, platform-driver-x86
Subsystem: arm/nomadik/ux500 architectures, multifunction devices (mfd), the rest · Maintainers: Linus Walleij, Lee Jones, Linus Torvalds

Use power_supply_put() to decrement the power supply's device reference
counter.

Signed-off-by: Krzysztof Kozlowski <redacted>
Acked-by: Pavel Machek <redacted>
Acked-by: Linus Walleij <redacted>
Acked-by: Lee Jones <redacted>
Reviewed-by: Bartlomiej Zolnierkiewicz <redacted>
Reviewed-by: Sebastian Reichel <sre@kernel.org>
---
 drivers/mfd/ab8500-sysctrl.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/drivers/mfd/ab8500-sysctrl.c b/drivers/mfd/ab8500-sysctrl.c
index d4a4b24be7c6..0d1825696153 100644
--- a/drivers/mfd/ab8500-sysctrl.c
+++ b/drivers/mfd/ab8500-sysctrl.c
@@ -51,6 +51,7 @@ static void ab8500_power_off(void)
 
 		ret = power_supply_get_property(psy, POWER_SUPPLY_PROP_ONLINE,
 				&val);
+		power_supply_put(psy);
 
 		if (!ret && val.intval) {
 			charger_present = true;
@@ -73,6 +74,7 @@ static void ab8500_power_off(void)
 			       pss[i]);
 			machine_restart("charging");
 		}
+		power_supply_put(psy);
 	}
 
 shutdown:
-- 
1.9.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help