From patchwork Mon Feb 23 11:47:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 5864391 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 D049C9F169 for ; Mon, 23 Feb 2015 11:50:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B5D3C2061F for ; Mon, 23 Feb 2015 11:50:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C45D520697 for ; Mon, 23 Feb 2015 11:50:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752351AbbBWLtn (ORCPT ); Mon, 23 Feb 2015 06:49:43 -0500 Received: from mailout4.w1.samsung.com ([210.118.77.14]:49176 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752658AbbBWLsa (ORCPT ); Mon, 23 Feb 2015 06:48:30 -0500 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NK800KL33NDXMA0@mailout4.w1.samsung.com>; Mon, 23 Feb 2015 11:52:25 +0000 (GMT) X-AuditID: cbfec7f4-b7f126d000001e9a-4e-54eb12f862aa Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id D4.7A.07834.8F21BE45; Mon, 23 Feb 2015 11:46:00 +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:26 +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 19/20] mfd: ab8500: Decrement the power supply's device reference counter Date: Mon, 23 Feb 2015 12:47:40 +0100 Message-id: <1424692061-30624-20-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: H4sIAAAAAAAAAy2RWUhUcRjF+89dXSZuo9nNoGKgAsuNjD4qJEnoki8GPrSgedVBLde5OmZR qZU1mutYD5PbMNbYuOUIlWtlaplrakLiuKSBe25pWlmj9nbO7zuH7+HQmKQGt6WDw6Jk8jA+ REqa4y1r73vsVySTXk65FpDaNiuCgg/JOCT8mcAhc/Q7BjWtqxRou20gSeMEGc9UGNzWlpHQ WXoUHpXvgKdzeSRUZ2txmBxzhraEKQoGfzQiqByeJiHrt04Euro0BIaRXgK+zC8R0F2VTcJC SgMC5aKahJIGIwXKDg0C3WopDl1v8k2N6b8kGD82klBUM4ZBa0sXAeopK2hJJqClOgpq737C oMLwEIOfz0eIk/u5wnlHbqDuHc6llS4QXKXaSHGzcz7ct3QVxVUU2nGjEzqCM+iVJNffW0Ny M+3tFJfbfJZ7nVNsChTc4hof9OPceMYv0nPnBfMTAbKQYIVM7ujqax6kntKLIvT01ZmyChSH lskkZEazjAtbXx6PNrUN2zlQZuLmtIR5gtiUleb/JlXEauL7Nhokc5it0BVsHKyZJjP2bUmK aN1gTBdiR0abqfWUFePDLo9pNxo4s4/V1Co3uJjh2MzJ+8Tmv91sc5PKpGnazMQHXyjWsYQ5 zaaUZ6F0JM5HW/RouyzaP0LwCwx1dhD4UCE6LNDBPzzUgDYXX3yFtE3H6hFDI6mleEgx4SUh eIUQG1qPWBqTWot3rZiQOICPvSaTh1+SR4fIhHokos1s49Dj4PYSwcXeP9zipsdwXkZdxF7J IWR9p0dkM55eVd1HXT7TQXlHpA9J7vl9jnTVJx1IrV0KURpOSdNivuZ4FhX6RtonGrdd4fX5 xW3ux7dezDlI650s9txox6dYj+sD7pVuDotRR84RKt1wohtjO2vp6BojX4g5X9rp7c+/9FqT 4kIQ72yHyQX+Hwd8MS3PAgAA 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 Acked-by: Pavel Machek Acked-by: Linus Walleij Acked-by: Lee Jones Reviewed-by: Bartlomiej Zolnierkiewicz Reviewed-by: Sebastian Reichel --- drivers/mfd/ab8500-sysctrl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mfd/ab8500-sysctrl.c b/drivers/mfd/ab8500-sysctrl.c index d4a4b24be7c6..0d1825696153 100644 --- a/drivers/mfd/ab8500-sysctrl.c +++ b/drivers/mfd/ab8500-sysctrl.c @@ -51,6 +51,7 @@ static void ab8500_power_off(void) ret = power_supply_get_property(psy, POWER_SUPPLY_PROP_ONLINE, &val); + power_supply_put(psy); if (!ret && val.intval) { charger_present = true; @@ -73,6 +74,7 @@ static void ab8500_power_off(void) pss[i]); machine_restart("charging"); } + power_supply_put(psy); } shutdown: