From patchwork Mon Jan 5 15:48:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 5568761 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 DBF6A9F4DC for ; Mon, 5 Jan 2015 15:49:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2609B2011B for ; Mon, 5 Jan 2015 15:49:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6656120121 for ; Mon, 5 Jan 2015 15:49:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754251AbbAEPsb (ORCPT ); Mon, 5 Jan 2015 10:48:31 -0500 Received: from mailout4.w1.samsung.com ([210.118.77.14]:55683 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753963AbbAEPs3 (ORCPT ); Mon, 5 Jan 2015 10:48:29 -0500 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NHP007IWO3G2U40@mailout4.w1.samsung.com>; Mon, 05 Jan 2015 15:52:28 +0000 (GMT) X-AuditID: cbfec7f4-b7f126d000001e9a-d2-54aab24a1739 Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 87.74.07834.A42BAA45; Mon, 05 Jan 2015 15:48:26 +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 19/19] arm: mach-pxa: Decrement the power supply's device reference counter Date: Mon, 05 Jan 2015 16:48:02 +0100 Message-id: <1420472882-10463-20-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+NgFprKLMWRmVeSWpSXmKPExsVy+t/xa7pem1aFGJx6a2Ax6cl7ZouJKycz W7x+YWix8+FbNovl+/oZLTY9vsZqcXnXHDaLz71HGC3unjrKZnHm9CVWi9O7Sxy4PXbOusvu sXmFlsemVZ1sHpuX1HtsudrO4tG3ZRWjx4rV39k9Pm+SC+CI4rJJSc3JLEst0rdL4Mp4d2IV e8FX1oonZ7exNzA2sXYxcnJICJhIPHzRzgZhi0lcuLceyObiEBJYyihx+v5idginj0ni4pEn jCBVbALGEpuXLwGrEhF4wiQxvfUkC0iCWcBQ4ue7P0AdHBzCAskS0xZpgYRZBFQlvk/rYQKx eQU8JNperIfaJidx8thksCs4geJNfy+AjREScJf48OwX6wRG3gWMDKsYRVNLkwuKk9JzDfWK E3OLS/PS9ZLzczcxQoLyyw7GxcesDjEKcDAq8fB6nFgZIsSaWFZcmXuIUYKDWUmE91X6qhAh 3pTEyqrUovz4otKc1OJDjEwcnFINjNMsDyndrj3J2CWULjbPkHO+2/RFSrJbmrOsVl5TmXcn NHvDjR19F3hPFDvWtG7oWFVg9P2ZeY/qsdYZWtMqLuZOVNi8bGfGjcnr5XdFHJhvFaa49TWb WFW680/d2K3zOtqan3NOUvSftUp3zhyDoI7HX3tn1Fie+rb9JoNAQeQNW6f1u+/K5iqxFGck GmoxFxUnAgB24/7FKAIAAA== 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 --- arch/arm/mach-pxa/raumfeld.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c index a762b23ac830..6dc4f025e674 100644 --- a/arch/arm/mach-pxa/raumfeld.c +++ b/arch/arm/mach-pxa/raumfeld.c @@ -758,8 +758,10 @@ static void raumfeld_power_signal_charged(void) struct power_supply *psy = power_supply_get_by_name(raumfeld_power_supplicants[0]); - if (psy) + if (psy) { power_supply_set_battery_charged(psy); + power_supply_put(psy); + } } static int raumfeld_power_resume(void)