From patchwork Fri Jan 30 14:47:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 5751151 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0B3D69F302 for ; Fri, 30 Jan 2015 14:52:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4CE3F201CE for ; Fri, 30 Jan 2015 14:52:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6F54820219 for ; Fri, 30 Jan 2015 14:52:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750852AbbA3OwV (ORCPT ); Fri, 30 Jan 2015 09:52:21 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:57441 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755186AbbA3Osz (ORCPT ); Fri, 30 Jan 2015 09:48:55 -0500 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NIZ003LOW03K180@mailout2.w1.samsung.com>; Fri, 30 Jan 2015 14:52:52 +0000 (GMT) X-AuditID: cbfec7f4-b7f126d000001e9a-80-54cb993f2d7e Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id F0.49.07834.F399BC45; Fri, 30 Jan 2015 14:46:23 +0000 (GMT) Received: from AMDC1943.digital.local ([106.116.151.171]) by eusync2.samsung.com (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0NIZ00EV0VSES470@eusync2.samsung.com>; Fri, 30 Jan 2015 14:48:48 +0000 (GMT) From: Krzysztof Kozlowski To: Sebastian Reichel , Dmitry Eremin-Solenikov , David Woodhouse , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, "Rafael J. Wysocki" , Len Brown , Jiri Kosina , David Herrmann , Cezary Jackiewicz , Darren Hart , Support Opensource , Milo Kim , Julian Andres Klode , Marc Dietrich , Greg Kroah-Hartman , linux-acpi@vger.kernel.org, linux-input@vger.kernel.org, platform-driver-x86@vger.kernel.org, patches@opensource.wolfsonmicro.com, ac100@lists.launchpad.net, linux-tegra@vger.kernel.org, devel@driverdev.osuosl.org, Linus Walleij , Samuel Ortiz , Lee Jones , linux-arm-kernel@lists.infradead.org, Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King Cc: Thomas Gleixner , Pavel Machek , Kyungmin Park , Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski Subject: [PATCH v3 19/20] mfd: ab8500: Decrement the power supply's device reference counter Date: Fri, 30 Jan 2015 15:47:57 +0100 Message-id: <1422629278-12202-20-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1422629278-12202-1-git-send-email-k.kozlowski@samsung.com> References: <1422629278-12202-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAAyWRaUiTcRzH+z/Xni1HD/PoQTFBUEnIA6V+hGW+KP9CRIEkRFlLl0pObVPJ 3ihq5JWaR9nyZNY8yul8UeYy8UqdmqmZ4dQ8EjM1rw7Mjk3ffb8fPj++L34sKWmlbNmIqFiZ Ikoa6ciIKMPfNyOHfB8aAj0WN+whu3+VgIYiLQ2V3ZkUJP9ZpCBv7hsJ+r4tAaiHbSCjwgPu VeeTkKLWMjBYdwTuN+yHJ2tlDDQXqyn4uuAJ/clLApj63omgaXqZgYJtDQGalhwEutlRGj6u /6Bh+GUxAxt3OxCkb6oYGB8WQ/rbCgSarToKhlrLTQfL/xiY6O1koFa/QEKfYYgG1ZIlGDJp MDTHwqvb70ho1BWS8Kt+lj7hglNTshhcte6OJ1vaKZxTt0HjJtWEAK+uBePPufkC3FjliucW NTTW1aQz2DiqZ/DKwIAAl/acw69LnpqEykTcmWWkztpeEPmEyiIj4mUK9+NXROGqpRoipoa9 uaJtREnoJ5OBWJbnvPkRrSgDCU3Rhh+c1JqwiJVwjxGfO62jd0s2wa+UjFNmi+G8+EZN5Y5l xS0L+a5sPWUuJDeO+CZ9NWG2LLlg3ti7uDNBcU782PNYMxZzmH/0u4rYnTvA93Tl0+YsNPH6 hZmdLOH8+Zz3RUwuEpejPTXIWhYXEqO8Gib3dFNK5cq4qDC3kGi5Du1+ffMFUncdbUMcixwt xGNSQ6CElsYrE+RtiGdJRytxQZ4JiUOlCbdkiujLirhImbINEazQNgkR8hHJ3IMb87EBGSvx 9lxAgfxiUqGmlM62VWzPJ3aV+PT451RZOChSJ092Yz+it99O5azY51IfeGbZY/7UQaeOKeEz uyBv+w9BtcZJn2tCdZpv351xGwhm4w9/Gah273DYu9C67/qxmU9egjVjmqgnTXrptMG/rF3t fL7bet3PkVKGSz1dSYVS+h+DNTgs0wIAAA== Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use power_supply_put() to decrement the power supply's device reference counter. Signed-off-by: Krzysztof Kozlowski Acked-by: Pavel Machek Acked-by: Linus Walleij Acked-by: Lee Jones Reviewed-by: Bartlomiej Zolnierkiewicz Reviewed-by: Sebastian Reichel --- 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: