From patchwork Tue Mar 10 08:27:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 5974951 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 B46249F318 for ; Tue, 10 Mar 2015 08:33:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ED3D920220 for ; Tue, 10 Mar 2015 08:33:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 080222024D for ; Tue, 10 Mar 2015 08:33:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752029AbbCJIbQ (ORCPT ); Tue, 10 Mar 2015 04:31:16 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:36210 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752459AbbCJI2R (ORCPT ); Tue, 10 Mar 2015 04:28:17 -0400 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 <0NKZ0083TMDR1W10@mailout2.w1.samsung.com>; Tue, 10 Mar 2015 08:32:15 +0000 (GMT) X-AuditID: cbfec7f4-b7f126d000001e9a-6a-54feaa8d2f0d Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 1F.EC.07834.D8AAEF45; Tue, 10 Mar 2015 08:25:49 +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 <0NKZ0033KM64IB70@eusync4.samsung.com>; Tue, 10 Mar 2015 08:28:14 +0000 (GMT) From: Krzysztof Kozlowski To: Sebastian Reichel , Dmitry Eremin-Solenikov , David Woodhouse , "Rafael J. Wysocki" , Len Brown , Jiri Kosina , David Herrmann , Cezary Jackiewicz , Darren Hart , Support Opensource , Milo Kim , 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 , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, 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 Cc: Thomas Gleixner , Pavel Machek , Kyungmin Park , Marek Szyprowski , Krzysztof Kozlowski Subject: [PATCH v6 22/22] arm: mach-pxa: Decrement the power supply's device reference counter Date: Tue, 10 Mar 2015 09:27:26 +0100 Message-id: <1425976046-20973-23-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1425976046-20973-1-git-send-email-k.kozlowski@samsung.com> References: <1425976046-20973-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAAyWRbyzUcRzHfX9/z9VtvxC/LD048yBb/lTTp9aMtfTtgWHTk7RycaE57H7O 6EmytebkkD8PLmtE+VNOOWv+XLTj5BzyZ2zkpGEpfy5czcTJ8ez1eb3f2/vBR0S6NVPeopS0 TLkyTZYqZcSUxfF58kxhoyM26Ovb06AZ+k1AbX8BBXm7vyh4tmAjwTC4zULNuCeoq4OgpKGU hBHdBah47wWdlTUULC8Fw1DeCgvf/pgQtH9fZaBsp46Auq4iBC3zkzRMbfylYbyjkoHNwl4E +XYtA029VhbqtnUUjH2q2i+v7jFgHTAx8MawRMKgZYwG7Yo7WAposHRmwsfHoyToW8pJ2Ho3 T4f54vqNQDzb1UPhIt0mjdu1VhYvFpeyWF/vj1sa8xk8M2lg8NrwMItfmGOwvvYhNj2dofDP kn8MtnVNMLh14gmFNa2NKNrzpvhyojw1JUuuDAyNFyevzGnIjB42e83YReQiA6NGriKeO883 TDQRh+zJj8w2H3g37hXit5oj1Ui8zxqCrx6ZIJ0Bw53j9XW1jDPw4Ewiftu2xDoPkhtD/PyC mXW23Ll4Plf744Apzo8frR+knSzhMG9eXGcP507x5r7SA++67+32aepw+hpvHVtHxUhShVwa 0XG5KiFDuJukCA4QZApBlZYUkJCuaEGHT7a3oZq+S0bEiZD0qGQqzhHrRsuyhByFEfEiUuoh MRXtK0miLOeBXJl+R6lKlQtGRIhcvXORsNcaayXUrx3ZZIyu0iAL184do29FEf0QUqi63+P5 /NEJ40uz30p0x3jYB38X6xWFMiLcWusTNHP2XkW3eipEFzsAs2xReeR61e3dnhu7075eekVo lODTQVyVZYmlNWXKuF0X94saS0zE0M4RJupkN3F9OT79i4q1CW12KSUky4L9SaUg+w/ZP+pq wgIAAA== 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 Reviewed-by: Bartlomiej Zolnierkiewicz Reviewed-by: Sebastian Reichel Acked-by: Robert Jarzmik Acked-by: Pavel Machek --- 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)