提交 6ff9d25b 编写于 作者: K Krzysztof Kozlowski 提交者: Sebastian Reichel

mfd: ab8500: Decrement the power supply's device reference counter

Use power_supply_put() to decrement the power supply's device reference
counter.
Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: NPavel Machek <pavel@ucw.cz>
Acked-by: NLinus Walleij <linus.walleij@linaro.org>
Acked-by: NLee Jones <lee.jones@linaro.org>
Reviewed-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Reviewed-by: NSebastian Reichel <sre@kernel.org>
Signed-off-by: NSebastian Reichel <sre@kernel.org>
上级 1a8dbe6f
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册