From patchwork Fri Feb 27 08:20:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 5898541 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CE9A3BF440 for ; Fri, 27 Feb 2015 08:22:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EC8ED20212 for ; Fri, 27 Feb 2015 08:22:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AE35920218 for ; Fri, 27 Feb 2015 08:22:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755066AbbB0IVu (ORCPT ); Fri, 27 Feb 2015 03:21:50 -0500 Received: from mailout3.w1.samsung.com ([210.118.77.13]:44138 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754959AbbB0IVG (ORCPT ); Fri, 27 Feb 2015 03:21:06 -0500 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NKF00BDT8POWY70@mailout3.w1.samsung.com>; Fri, 27 Feb 2015 08:25:01 +0000 (GMT) X-AuditID: cbfec7f5-b7fc86d0000066b7-dc-54f02854a8c2 Received: from eusync1.samsung.com ( [203.254.199.211]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 26.97.26295.45820F45; Fri, 27 Feb 2015 08:18:28 +0000 (GMT) Received: from AMDC1943.digital.local ([106.116.151.171]) by eusync1.samsung.com (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0NKF007VV8HM7X70@eusync1.samsung.com>; Fri, 27 Feb 2015 08:20:56 +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 Cc: Thomas Gleixner , Pavel Machek , Kyungmin Park , Marek Szyprowski , Krzysztof Kozlowski Subject: [PATCH v5 19/20] mfd: ab8500: Decrement the power supply's device reference counter Date: Fri, 27 Feb 2015 09:20:00 +0100 Message-id: <1425025201-15926-20-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1425025201-15926-1-git-send-email-k.kozlowski@samsung.com> References: <1425025201-15926-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAAy2RfSzUcRzH+97v4X4nV7+O9KPV5rZamce0+fRIW813rbZat/5oJYcLG8fu MLSWh/oDeUoUo9jhUKhTK5Hk4dAhMZYNDVfpPLtQ5MrTf+/3+/N67/PHmyFEdaQNEygPkynk 0iAxbUbqTC09DpIDMxLn1IdbIaVjhgeFrUkkxK0YSLivnyagtn2JD6oeK0gscIb00gwC4lWV NHRVuEHWi11QPPuEhppcFQnjYy7QETfBh6/zzQiqhydpePBXzQN1XSoCzWgfBf1zCxT0vM2l wZjchCDhVw4N5U2DfEj4VIBAvVRBQnd9/mpj8h8Ngx+baXhaO0ZAu66bgpwJC9AlUaCrCYN3 dz8TUKXJJOD381HKYz8umXPCQ3WNJE6tMFK4OmeQj2dmvfC3tAw+riqxw3qDmsKasgQaD/TV 0niqs5OPH7ddxO/znq0Chbdx870BEv9MX6YvWF8xO+4nCwqMkCmcTnqbBeRMlPFCy5jIqcoq FIMW6UQkYDj2MJdWZNjUVlzXUOWqNmNEbBHiche0myaFx9U9NqA1imZduSp14frBktUKuA/l ybw1Q7DdiBvVt/HXKAvWi+up7l1vkOw+bqz5z3ouZDHXpcomNv7t5dq0GdSaFqzmUyvZ64yI 9eQqCxZRGhLmoy1laKcs3DdU6eMffMhRKQ1Whsv9HX1DgjVoY/P5N6hIe7QBsQwSmwsxNyMR UdIIZVRwA+IYQmwpRMPTEpHQTxoVLVOEXFeEB8mUDYjHCGxikI+ctXX0t+i/oxU/OjUNr0t9 rWPHHQKNGlFjqT0/wMem99L2kSV7MjM2vsZ1t6ddfPSXqD0/3E0peQ1ZI61GkyHo7LZrL4vH zpx79R2Tx+JtzSONl+tPOHXybhJZN5IlpoMt8lRvg56TCXao3E+f92D8TLrqriNuV215y7eW 5sSkMkDqYkcolNL/1FhF6NECAAA= 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: