From patchwork Tue Mar 10 08:27:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 5974661 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 06A589F318 for ; Tue, 10 Mar 2015 08:29:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4027E20256 for ; Tue, 10 Mar 2015 08:29:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4C07B2022D for ; Tue, 10 Mar 2015 08:29:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752675AbbCJI2v (ORCPT ); Tue, 10 Mar 2015 04:28:51 -0400 Received: from mailout4.w1.samsung.com ([210.118.77.14]:31151 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752334AbbCJI2g (ORCPT ); Tue, 10 Mar 2015 04:28:36 -0400 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 <0NKZ004X2MDNFO00@mailout4.w1.samsung.com>; Tue, 10 Mar 2015 08:32:11 +0000 (GMT) X-AuditID: cbfec7f4-b7f126d000001e9a-65-54feaa8c90c1 Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 0C.EC.07834.C8AAEF45; Tue, 10 Mar 2015 08:25:48 +0000 (GMT) Received: from AMDC1943.digital.local ([106.116.151.171]) by eusync4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NKZ0033KM64IB70@eusync4.samsung.com>; Tue, 10 Mar 2015 08:28:13 +0000 (GMT) From: Krzysztof Kozlowski To: Sebastian Reichel , Dmitry Eremin-Solenikov , David Woodhouse , "Rafael J. Wysocki" , Len Brown , Jiri Kosina , David Herrmann , Cezary Jackiewicz , Darren Hart , Support Opensource , Milo Kim , 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 , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, 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 Cc: Thomas Gleixner , Pavel Machek , Kyungmin Park , Marek Szyprowski , Krzysztof Kozlowski Subject: [PATCH v6 21/22] mfd: ab8500: Decrement the power supply's device reference counter Date: Tue, 10 Mar 2015 09:27:25 +0100 Message-id: <1425976046-20973-22-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1425976046-20973-1-git-send-email-k.kozlowski@samsung.com> References: <1425976046-20973-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAAy2RbUhTYRTHe3bv7q7S4vrSvEkJTQwRUqeBp7KIEnroi0qSlCxbOpzgVDYn mkJmifmSb6uIIWKoaNO0Nj/ku6izfM20WZYaotYqnaVLZabmtG+/8z8/zv/DoQnHBtKVjo1P kiriJXFCyp4c2Ho9fjxfuxXmW7opgIKhXxyofJNHQubmDxJK5pYIaB208qBiTAC5T32h+Jma gJH6AHj80gVaSitI+GkSwVDmAg++/DEgaJpZpODh32oOVLcXItDNjnNhYnmVC2PNpRSsPOhB kGPRUPC8Z4oH1dZ6EkY7y3fkxW0KpvoNFNS2mggYHBjlgmbBCQbyuDDQkgRtWe8I0OseEbD+ YpZ7zh3XLPvg6fZuEhfWr3Bxk2aKh+eL1Dysr/HCOm0OhSfHWylsHh7m4bK+UKyvvI0N+ZMk /l68QeGldiOFG43ZJC5o1KIQwTX7wGhpXGyyVOFz9oa9TLOg5SRq6RRzgx5loDUqF9nRLHOC zW0c5+6xgB2ZbtjJ7WlHpgqxamsHaVs4MgUctnz+io0pxp/VV1fuSs6MgWatSyaebSCYUcTO zvXxbJYTc529o2nbPUsyHmz5xkdkYz6D2ea3dZy9Oje2r1e969jt5BbLp/9tF9mp0d+oCPHL 0T4tOihVRSUqb8bIRd5KiVypio/xjkqQ69Deky2vUEXvqS7E0Ei4nz8RsRXmyJUkK1PlXYil CaEz31C4E/GjJam3pIqESIUqTqrsQhzazjUDiVNYoahnOFAkvptuNFdlroS63Avpc/DnrKZd ipC6mcI79arLZyJZ9/visuDibPPRQ2PbSqNM3uGnuGCpNYcfOZ1Mz3xInemctAtKOybIOvxn LT1PJX5/YD1bnVpneHK1O9jzc1D/ef6EjLE4VJUULnj6+Xw9GS775hUWYPLoEZJKmUTkRSiU kn/98fVJwgIAAA== 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: