From patchwork Thu Mar 12 07:44:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 5991641 Return-Path: X-Original-To: patchwork-linux-input@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 14ED7BF90F for ; Thu, 12 Mar 2015 07:50:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5292E2034B for ; Thu, 12 Mar 2015 07:50:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 662A8200CF for ; Thu, 12 Mar 2015 07:50:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753579AbbCLHpd (ORCPT ); Thu, 12 Mar 2015 03:45:33 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:8801 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753277AbbCLHpK (ORCPT ); Thu, 12 Mar 2015 03:45:10 -0400 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NL300DCG9PY2950@mailout1.w1.samsung.com>; Thu, 12 Mar 2015 07:49:10 +0000 (GMT) X-AuditID: cbfec7f5-b7fc86d0000066b7-f3-5501436a32cd Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 5C.2C.26295.A6341055; Thu, 12 Mar 2015 07:42:34 +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 <0NL300KWS9IOZC60@eusync2.samsung.com>; Thu, 12 Mar 2015 07:45:04 +0000 (GMT) From: Krzysztof Kozlowski To: Jiri Kosina , Henrik Rydberg , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Sebastian Reichel , Dmitry Eremin-Solenikov , David Woodhouse , linux-pm@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [RESEND PATCH v6 21/22] mfd: ab8500: Decrement the power supply's device reference counter Date: Thu, 12 Mar 2015 08:44:19 +0100 Message-id: <1426146260-30081-22-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1426146260-30081-1-git-send-email-k.kozlowski@samsung.com> References: <1426146260-30081-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpjluLIzCtJLcpLzFFi42I5/e/4Fd0sZ8ZQg8Vv5S0mPXnPbDFx5WRm i91zFrNYvH5haHHz0zdWi8u75rBZfO49wmhx4ts0JovTu0scOD0+r3rF6rFz1l12j80rtDw2 repk8+jbsorR48yCI+wenzfJBbBHcdmkpOZklqUW6dslcGXMerOKqWAVR8W79ZsZGxi/s3Ux cnBICJhITHqY0sXICWSKSVy4tx4ozMUhJLCUUeL1sn8sEE4fk0Tbvc/sIFVsAsYSm5cvAasS EZjPJNG/6gQrSIJZwFDi57s/YEXCAqkSjT1bwGwWAVWJ3g0/mEBsXgEPiYUvehkh1slJnDw2 mRXkCk6g+OtFPCBhIQF3iZnLPrFPYORdwMiwilE0tTS5oDgpPddIrzgxt7g0L10vOT93EyMk 7L7uYFx6zOoQowAHoxIPb0QfQ6gQa2JZcWXuIUYJDmYlEV4OK8ZQId6UxMqq1KL8+KLSnNTi Q4xMHJxSDYwpjOsi5uxvMzkk3qYtsc/GbI/yq5inPuyix3Kulx/meer4p+IG26LvbS8XCB6M /Pt50W+7AlMF3u2+jCtuLKpTCH7/Z/kEl9Xc/M3Pnbe4R5xJ2Ku3aUrXG99dd1+V8MS4J719 kTjzoEuExAKHmW4TtAM+7P0nX1lyMOFKzy7m7f3eW/m+fT+uxFKckWioxVxUnAgAApArahkC AAA= Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@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: