From patchwork Mon Jan 5 15:48:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 5568891 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 1EFE1BF6C3 for ; Mon, 5 Jan 2015 15:50:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 505A920148 for ; Mon, 5 Jan 2015 15:50:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6483E20121 for ; Mon, 5 Jan 2015 15:50:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754423AbbAEPtv (ORCPT ); Mon, 5 Jan 2015 10:49:51 -0500 Received: from mailout3.w1.samsung.com ([210.118.77.13]:57063 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754219AbbAEPsa (ORCPT ); Mon, 5 Jan 2015 10:48:30 -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 <0NHP00HGJO3I0R40@mailout3.w1.samsung.com>; Mon, 05 Jan 2015 15:52:30 +0000 (GMT) X-AuditID: cbfec7f5-b7fc86d0000066b7-d3-54aab24b05e2 Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 55.80.26295.B42BAA45; Mon, 05 Jan 2015 15:48:27 +0000 (GMT) Received: from AMDC1943.digital.local ([106.116.151.171]) by eusync4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NHP00HBJNWDWI80@eusync4.samsung.com>; Mon, 05 Jan 2015 15:48:26 +0000 (GMT) From: Krzysztof Kozlowski To: "Rafael J. Wysocki" , Len Brown , Sebastian Reichel , Dmitry Eremin-Solenikov , David Woodhouse , Pavel Machek , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-pm@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [RFC PATCHv2 18/19] mfd: ab8500: Decrement the power supply's device reference counter Date: Mon, 05 Jan 2015 16:48:01 +0100 Message-id: <1420472882-10463-19-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1420472882-10463-1-git-send-email-k.kozlowski@samsung.com> References: <1420472882-10463-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprGLMWRmVeSWpSXmKPExsVy+t/xa7rem1aFGEydp24x6cl7ZouJKycz W7x+YWix8+FbNovl+/oZLTY9vsZqcXnXHDaLz71HGC3unjrKZnHm9CVWi9O7Sxy4PXbOusvu sXmFlsemVZ1sHpuX1HtsudrO4tG3ZRWjx4rV39k9Pm+SC+CI4rJJSc3JLEst0rdL4MrYu2AC W8E29opj724zNjD2snUxcnJICJhITP+3ggnCFpO4cG89UJyLQ0hgKaPE2vtbWSGcPiaJi0ee MIJUsQkYS2xevgSsSkTgCZPE9NaTLCAJZgFDiZ/v/rCD2MICiRLbN18Fs1kEVCX+TXrADGLz CnhINPQ/Z4RYJydx8thkVhCbEyje9PcC2BwhAXeJD89+sU5g5F3AyLCKUTS1NLmgOCk910iv ODG3uDQvXS85P3cTIyQsv+5gXHrM6hCjAAejEg+vx4mVIUKsiWXFlbmHGCU4mJVEeF+lrwoR 4k1JrKxKLcqPLyrNSS0+xMjEwSnVwHiOP9epSupDXdrxmoxbi7xdUhzLmedlmjhbfnoT+e++ WB7L9zNxLxtbvp4+eU1ybub6g02LM5uvGa5bnTztxtcFXjt5z57t2fQh8fueef//By+e+1nY 4DDLpWwvhej05p/ap7+2Ovh/dP76tT/rQtCVH0VLDRrPhcZna8X5Xn+5/dZu717jc9pKLMUZ iYZazEXFiQCDy+mXKQIAAA== 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 --- 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: