From patchwork Fri Jan 30 14:47:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 5750861 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B56E5BF440 for ; Fri, 30 Jan 2015 14:49:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 01C00201CE for ; Fri, 30 Jan 2015 14:49:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 83ED220304 for ; Fri, 30 Jan 2015 14:48:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422692AbbA3Oso (ORCPT ); Fri, 30 Jan 2015 09:48:44 -0500 Received: from mailout4.w1.samsung.com ([210.118.77.14]:50429 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932992AbbA3Osj (ORCPT ); Fri, 30 Jan 2015 09:48:39 -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 <0NIZ00FO3VZKYJ80@mailout4.w1.samsung.com>; Fri, 30 Jan 2015 14:52:32 +0000 (GMT) X-AuditID: cbfec7f4-b7f126d000001e9a-26-54cb992ef489 Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 7C.19.07834.E299BC45; Fri, 30 Jan 2015 14:46:06 +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 <0NIZ00EV0VSES470@eusync2.samsung.com>; Fri, 30 Jan 2015 14:48:31 +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 , Russell King Cc: Thomas Gleixner , Pavel Machek , Kyungmin Park , Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski Subject: [PATCH v3 08/20] power_supply: apm_power: Use power_supply_*() API for accessing function attrs Date: Fri, 30 Jan 2015 15:47:46 +0100 Message-id: <1422629278-12202-9-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1422629278-12202-1-git-send-email-k.kozlowski@samsung.com> References: <1422629278-12202-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAAyWRazBUcRjG/fdc9qyx08m6nDRq0jRNGrfJ1DtNY2rG5EzTB2b4kGnSYnPJ ol1EHyJkxhJyS8Y1sqiwu6PIuoxaxXGLGMXqgkbut26maJdvv/d93vd5PjwUZt6O21Ah4VES Wbg4zI40xbmtN+8dHB9y3s5Jtccho2+FB6qCegIq36bhkPhvDofs6WUMtL2bfKgYtgJFuTPc r8nBIKminoTBulOQr7KGqtVSElqKKnCYn3WBvsQFPnz6oUPQ/GWRhNy/Sh4o2zIRqKdGCfiw 9pOA4ZdFJKzfe40gdaOQhPFhIaQOlCNQbtbhMNRRZnhY3CZB36Mj4Yl2FoNeboiAwgURcGkE cC1R0Hr3HQYadR4GvxumiLNH2eSkdJKtXnNiJ9te4Wxm3TrBNhfq+ezK6hV2JiuHz2qq7dnp OSXBqmtTSXZiVEuyS/39fLak24ttL35qOKiMZ3XpE7inja/pmUBJWEiMRObkdtU0OL1lkIxc E8Qm/9LzElAHpUACiqFdmdKtdN4uWzGDk/Wkkc3px4hZ0vsokKmBM3jMXOt3wiiQ9AlGo6wk jYIFvShgujK0uHHA6HHENGtrdqxEdCjT09/LVyCKwukjTF6ztRGFtAczwtnshh1gurtydjwF NMs0zH4ldoM9mMyRAjILCcuQSS2ylEQHRMr9g6QujnKxVB4dHuQYECFVo93SN5pQRdfpTkRT yM5MOCbmvM0JcYw8TtqJGAqzsxDmZhtWwkBx3C2JLMJPFh0mkXciHiWwSUAWPuePhWRe8tUU ec44uQtjivfGUcm5J7N41u7jTYu6gw8urh96ztnGyOc7LSPPpTTuq5q+5rdmGd/IKW1V+538 FdtjqmVMlZ9/8+Mdtdt12Y0/IiI09vaYRPfom8p1T6hZ9rMFneiwxYSD1+fLNRdKTEQpbkuB UQWDLxK3/AZ0lna4PFjsYo/J5OL/O1u15tICAAA= 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 Replace direct calls to power supply function attributes with wrappers. Wrappers provide safe access in case of unregistering the power supply (e.g. by removing the driver). Replace: - get_property -> power_supply_get_property Signed-off-by: Krzysztof Kozlowski Acked-by: Jonghwa Lee Acked-by: Pavel Machek Reviewed-by: Bartlomiej Zolnierkiewicz Reviewed-by: Sebastian Reichel --- drivers/power/apm_power.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/power/apm_power.c b/drivers/power/apm_power.c index 39763015b360..2206f9ff6488 100644 --- a/drivers/power/apm_power.c +++ b/drivers/power/apm_power.c @@ -15,10 +15,10 @@ #include -#define PSY_PROP(psy, prop, val) (psy->get_property(psy, \ +#define PSY_PROP(psy, prop, val) (power_supply_get_property(psy, \ POWER_SUPPLY_PROP_##prop, val)) -#define _MPSY_PROP(prop, val) (main_battery->get_property(main_battery, \ +#define _MPSY_PROP(prop, val) (power_supply_get_property(main_battery, \ prop, val)) #define MPSY_PROP(prop, val) _MPSY_PROP(POWER_SUPPLY_PROP_##prop, val)