From patchwork Fri Feb 27 08:20: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: 5898471 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 156EF9F373 for ; Fri, 27 Feb 2015 08:21:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5CE02201B9 for ; Fri, 27 Feb 2015 08:21:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8359C2020E for ; Fri, 27 Feb 2015 08:21:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754976AbbB0IVJ (ORCPT ); Fri, 27 Feb 2015 03:21:09 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:46743 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754932AbbB0IVB (ORCPT ); Fri, 27 Feb 2015 03:21:01 -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 <0NKF00HAV8PNLM70@mailout2.w1.samsung.com>; Fri, 27 Feb 2015 08:25:00 +0000 (GMT) X-AuditID: cbfec7f5-b7fc86d0000066b7-e5-54f028557e3e Received: from eusync1.samsung.com ( [203.254.199.211]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id C9.97.26295.55820F45; Fri, 27 Feb 2015 08:18:29 +0000 (GMT) Received: from AMDC1943.digital.local ([106.116.151.171]) by eusync1.samsung.com (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0NKF007VV8HM7X70@eusync1.samsung.com>; Fri, 27 Feb 2015 08:20:58 +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 Cc: Thomas Gleixner , Pavel Machek , Kyungmin Park , Marek Szyprowski , Krzysztof Kozlowski Subject: [PATCH v5 20/20] arm: mach-pxa: Decrement the power supply's device reference counter Date: Fri, 27 Feb 2015 09:20:01 +0100 Message-id: <1425025201-15926-21-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1425025201-15926-1-git-send-email-k.kozlowski@samsung.com> References: <1425025201-15926-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAAyWRW0iTcRjG++87bdPBxzT79CJiYIiQZ/IlIiQo/9BFRXbjRTl1qOBUNpUU IzF24fkwsxyamoeZljNXkM3UPKU5TR0tDDVtRmt5PlW2VZve/Z6H53nfi4dPiHtIH35SSrpM kSJNltBCcvzvW9Op634bUUEf74dCycQGD5pGC0nIc9hIqFheJ6DHuM9Ao8kLChqCoPyxmoC7 jToapjrCoerZMWjZrKPBUNNIwg9rMEzkrTDweXcYQffSKg2Vdi0PtL2lCLosZgpmt/YoML2q oWG7eAhB/o6GhqdD8wzkv29AoN3vIGGmv97ZWP1Hw/y7YRrae6wEGMdnKNCseMB4IQXjhnR4 rZomQN91j4BfnRYq4iRu3QrEC72DJC7t2KZwt2aewRubN/DXMjWD9a3+eNmmpXBXWz6N58w9 NF6bnGTww7GruK/2iTPQdAcPF82R+Hv5H/qKd7TwbLwsOSlTpgg8FyNMrBqc5aXVMLcMJX10 LtLQBYjP59gw7oHJrQAJnOjFTS3onLaQL2abEdc/VE4cihIeV1e7j1wpmg3l9Nqmg5QnOyLg 3jwt5rkEwc4gzrI8xrjOerAx3GQd5SqQrC/Xvr/Fc7GIxVz5tw/U4bvj3NiI+oAFTn/NUc24 WMxGcrqGn6gMierRkTZ0VJYRl6aMTZCHBCilcmVGSkJAXKq8Cx0uvvsSNY+cGUAsH0ncRZjb iBJT0kxllnwAcXxC4ilCS+tRYlG8NCtbpki9qchIlikHEI8v8MlFaFMl1wgCHV+yctIjF3/b zGnn9d6nyYAWg+ORqnp5/bldPRr9YjTMWjFXRF1y110U2sJRZUT4UFWIXu3nvufWPrV7uTTH o81/2s13cVUXa7Ca9TE75rqwwZbJSEl2U8enrDXjbbwUlrNq7zRDldUo8eq/ZpHGt6pO2Esv SEhlojTYn1Aopf8B5KEB9M8CAAA= 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)