From patchwork Mon Feb 23 11:47:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 5864301 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 88A8F9F269 for ; Mon, 23 Feb 2015 11:49:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CB79B20697 for ; Mon, 23 Feb 2015 11:48:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BCB8F20694 for ; Mon, 23 Feb 2015 11:48:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752821AbbBWLsl (ORCPT ); Mon, 23 Feb 2015 06:48:41 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:55423 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752421AbbBWLsd (ORCPT ); Mon, 23 Feb 2015 06:48:33 -0500 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 <0NK800IKX3NKXAA0@mailout2.w1.samsung.com>; Mon, 23 Feb 2015 11:52:32 +0000 (GMT) X-AuditID: cbfec7f4-b7f126d000001e9a-67-54eb12fddc3e Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 0B.7A.07834.DF21BE45; Mon, 23 Feb 2015 11:46:05 +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 <0NK8001843FJ0A90@eusync2.samsung.com>; Mon, 23 Feb 2015 11:48:30 +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 v4 20/20] arm: mach-pxa: Decrement the power supply's device reference counter Date: Mon, 23 Feb 2015 12:47:41 +0100 Message-id: <1424692061-30624-21-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1424692061-30624-1-git-send-email-k.kozlowski@samsung.com> References: <1424692061-30624-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAAy2Ra0iTcRSH+++97J25ep1mbwpdBgoKeaGiQ0QEfeiFDBUUIcJcOqbhVDYd alFi9cHb1JwWw1KbuWlOc4vSnFreymtriiboVLQwL3ktSzPbtG+/85zn8PtwKExgwt2omLhE sSxOFCskHfCev+8Hj28J5kL8Jus8QNm3xIHyD1k4pG/N4vBgehEDU+8GFzQDrpBZ5gf5lQUY 3NXUkmCuOQ1FdQehYrmEhMZiDQ5zM/7Qlz7PhfEfHQgaJhdIUP3RckDbnIvAMDVEwMjKTwIG 3hSTsJrTjiBjTU2Cvn2MCxkfyxBoN2pwsLwttV0sbJMw1t1BwnPTDAa9PRYC1PPO0JNFQE9j IjTd/4SB0VCIwa8XU8R5T1a34stam9twNrdmlWAb1GNcdmk5nP2SV8BljTpvdnpWS7CGqgyS HR0ykez3/n4u+6QrmG15XG0Tyu+wHdmjOPstf5MMOnTF4WyUODZGIZb5notwiC5qG+EkFHOT G5UtZBpSk5mIRzH0SWZaNYnvZlfGbK21cQdKQD9DTOHaGLIvBLSSw6ybL9gzSZ9gjNryHcmF 7uQx7/Q5HPuA0RbETE13ce2WMx3BTOR1EvaM0x6MXtm+w/k0yxhy6v5XH2a6OgtsDkXxbHz8 lWK37CKTU6dCeYhfivZUoQPipMgE+XWJ1N9HLpLKk+IkPpHxUgPa/fhaPdJ0nmlFNIWEjvwJ xWyIgBAp5CnSVsRQmNCF7/7bhvhRopRUsSz+miwpVixvRRyK55aGirsy752au20Oar3qHqZJ Ga5+xHkaECytfEntjywczv3sOYKrUvc2h3SYja9Dxbfmqwz+wghV/deGEq/NfL3LvmqvI07z s8rkYMEN6+B2aFufY+Cct0WiC2wRLVqCM/3Wsy+rFM1IJznGCc9ObHKyirGbi8MBR8N0vEsV D7v1QlweLfL3xmRy0T8Urnv4zwIAAA== 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)