From patchwork Fri Jan 30 14:47:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 5751191 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 656759F302 for ; Fri, 30 Jan 2015 14:53:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9EB4D2027D for ; Fri, 30 Jan 2015 14:53:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CA85B20219 for ; Fri, 30 Jan 2015 14:53:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755994AbbA3OwT (ORCPT ); Fri, 30 Jan 2015 09:52:19 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:57414 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755391AbbA3Os4 (ORCPT ); Fri, 30 Jan 2015 09:48:56 -0500 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) 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 <0NIZ004I3W05WM80@mailout2.w1.samsung.com>; Fri, 30 Jan 2015 14:52:53 +0000 (GMT) X-AuditID: cbfec7f5-b7fc86d0000066b7-92-54cb99401df9 Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id F9.88.26295.0499BC45; Fri, 30 Jan 2015 14:46:24 +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 <0NIZ00EV0VSES470@eusync2.samsung.com>; Fri, 30 Jan 2015 14:48:49 +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 , Russell King Cc: Thomas Gleixner , Pavel Machek , Kyungmin Park , Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski Subject: [PATCH v3 20/20] arm: mach-pxa: Decrement the power supply's device reference counter Date: Fri, 30 Jan 2015 15:47:58 +0100 Message-id: <1422629278-12202-21-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1422629278-12202-1-git-send-email-k.kozlowski@samsung.com> References: <1422629278-12202-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAAyWRfyyUcRzH+97zPN/n7tbpGdIzrf64ZTZKxPJJrfRPHm2tH7Nqlri4oc6P 7jCs1u8/OOfE1UoRHU4y6qyNHPl1pEN+xDJOi1OXkIiaUt3x3+vzeb/fe3+2D59wbCZd+bHx SVJ5vEQmxkLS9Lfj3Y7A+6YQ7yWLELK753jw/F41BSWvlSRcX5kiIdfyjQBD1zIN2gEXyCz2 httP8gi4oa3G0FvlD3efb4Ky748w1D/UkvDV6gPd16dp+LBoRFD3cQaD5o+OB7pGNQL9xBAF w/NLFAy8fIhhQdWGIONHPoaRARFkvC1GoFuuIqG/qcgWmPmHwfzGiOGpwUpAl6mfgvxpJzAp KTDVJ0HDrT4CavR3CPj1bIIKdOdu3sjCXPn8Tm6ssZXk1FULFFeXb6a5ue9nucmcPJqrKffg LFM6itNXZGBudMiAudmeHpor7DzOvSqotBlKrnDGrFHymGuocF+UVBabIpXv3B8hjBmfnSUT v+BUS1MufRVNU5lIwGcZP7b2wV1ijV3Y3rFqbGdHphSxbVbnTCS0cTaPLa0vRXYBM75sja4E 2wVnZkbAtmcbSPtAMCOIrTM84dldTkwEu5I1v5ogGTfWMFNE21nEcOw1awe9VreV7WzPWz1D YNs/s45Ta9VBrHrwHs5BoiK0rgJtlCZHJirORcft8lJI4hTJ8dFekQlxerT29sVaVNoe0IIY PhKvF72XmEIcKUmKIi2uBbF8Quws0uTaVqIoSVq6VJ4QLk+WSRUtiMcXuF5FlzufkuL+QuLQ mWsOe5TpK+6fDt//vWC0Fqe+kIVN+Ad5xaobfFs1qrJtS2XdnSxKfxlqQSeubNgd4BB8ae/B 8+WDwzhc//jEqQqNzHxS59m8PXjywJHCzRc8C7Q+fsqIxb6pud7oo5dPVwvCzNLaz8GqdQmW S40FrZUXVVt+umnFpCJG4uNByBWS/4iKSO7UAgAA 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 --- 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)