From patchwork Thu Mar 12 07:44:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 5991351 Return-Path: X-Original-To: patchwork-linux-input@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 0EB329FB80 for ; Thu, 12 Mar 2015 07:45:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 48F4B2034B for ; Thu, 12 Mar 2015 07:45:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5AC1E20383 for ; Thu, 12 Mar 2015 07:45:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753020AbbCLHpp (ORCPT ); Thu, 12 Mar 2015 03:45:45 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:8801 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753301AbbCLHpL (ORCPT ); Thu, 12 Mar 2015 03:45:11 -0400 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NL300DCF9PY1Y50@mailout1.w1.samsung.com>; Thu, 12 Mar 2015 07:49:11 +0000 (GMT) X-AuditID: cbfec7f4-b7f126d000001e9a-99-5501436f6ab0 Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 0E.FA.07834.F6341055; Thu, 12 Mar 2015 07:42:39 +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 <0NL300KWS9IOZC60@eusync2.samsung.com>; Thu, 12 Mar 2015 07:45:04 +0000 (GMT) From: Krzysztof Kozlowski To: Jiri Kosina , Henrik Rydberg , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Sebastian Reichel , Dmitry Eremin-Solenikov , David Woodhouse , linux-pm@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [RESEND PATCH v6 22/22] arm: mach-pxa: Decrement the power supply's device reference counter Date: Thu, 12 Mar 2015 08:44:20 +0100 Message-id: <1426146260-30081-23-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1426146260-30081-1-git-send-email-k.kozlowski@samsung.com> References: <1426146260-30081-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpnluLIzCtJLcpLzFFi42I5/e/4Fd18Z8ZQgx8rTC0mPXnPbDFx5WRm i91zFrNYvH5haHHz0zdWi8u75rBZfO49wmhx4ts0JovTu0scOD0+r3rF6rFz1l12j80rtDw2 repk8+jbsorR48yCI+wenzfJBbBHcdmkpOZklqUW6dslcGW8edDHXHCYveLdoX1MDYx72LoY OTkkBEwkNt65ywhhi0lcuLceKM7FISSwlFHix5KXzBBOH5NE273P7CBVbALGEpuXLwGrEhGY zyTRv+oEK0iCWcBQ4ue7P2BFwgLpEu3de8FsFgFViSmfDzCB2LwCHhKND84yQ6yTkzh5bDJQ LwcHJ1D89SIekLCQgLvEzGWf2Ccw8i5gZFjFKJpamlxQnJSea6hXnJhbXJqXrpecn7uJERJ4 X3YwLj5mdYhRgINRiYc3oo8hVIg1say4MvcQowQHs5IIL4cVY6gQb0piZVVqUX58UWlOavEh RiYOTqkGxjot77mhUQfucHRcn7d8pkDXmz7/JfJczMuSmNckOcQ37ZuTrN2fnnfewvx9jcXB uTb6jTt6jI5PPd3YvSlE/O5LUdfVF4JezpHiYL/nYiWac8q5Wliu9VG/4MagJlbfgPYml/Rn n/4kH9FbVKC5L+Nhm7eKP+OyBIXDdi8/tcZwlYVoFnIqsRRnJBpqMRcVJwIAmZIGJhoCAAA= Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@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)