From patchwork Fri Feb 27 08:19:49 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 5899161 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 7AF699F373 for ; Fri, 27 Feb 2015 08:28:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AB4E7201CE for ; Fri, 27 Feb 2015 08:28:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2A65C2020E for ; Fri, 27 Feb 2015 08:28:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754947AbbB0I1v (ORCPT ); Fri, 27 Feb 2015 03:27:51 -0500 Received: from mailout3.w1.samsung.com ([210.118.77.13]:44088 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754798AbbB0IUk (ORCPT ); Fri, 27 Feb 2015 03:20:40 -0500 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NKF00ADR8P6VR70@mailout3.w1.samsung.com>; Fri, 27 Feb 2015 08:24:42 +0000 (GMT) X-AuditID: cbfec7f4-b7f126d000001e9a-0d-54f028451e6f Received: from eusync1.samsung.com ( [203.254.199.211]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id C4.AD.07834.54820F45; Fri, 27 Feb 2015 08:18:13 +0000 (GMT) Received: from AMDC1943.digital.local ([106.116.151.171]) by eusync1.samsung.com (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0NKF007VV8HM7X70@eusync1.samsung.com>; Fri, 27 Feb 2015 08:20:38 +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 v5 08/20] power_supply: apm_power: Use power_supply_*() API for accessing function attrs Date: Fri, 27 Feb 2015 09:19:49 +0100 Message-id: <1425025201-15926-9-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1425025201-15926-1-git-send-email-k.kozlowski@samsung.com> References: <1425025201-15926-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAAyWRfSzUcRzH+97v4e7ktp8j/bLlD6tWVh5G81laWTLf1h9l+aNHXJyHOOwO i7VlmtZ5fqg2oog6lIdOeXa4UDouD5vSPIxTQxyHaI7k4b/X+7PXe+8/PjxCqCKteCHhUWJp uCjMhjYhNf8+DZzwOLrg7WB4bwppPQscKP6cTELCxgwJWZPzBDR1r3GhaMASkgodILM0m4AH RZU09Fa4wNN3++G14QUNjXlFJPyecoSehFkujP3pQFA/PkfD43UFBxSqdARK3SAFQ4srFAw0 5NGwlNqOQL6cS0N5+wgX5F8LESjWKkjoby3Yasxt0jDypYOGN01TBHRr+inInTUHTTIFmsYo aE7sI6Ba+YSAv1U6yu0ILlm0x6OqjyROr1iicH3uCBcvGHzwz4xsLq4uscWTMwoKK8vkNB4e bKKxXqvl4uddXrgl/+2WUHwfd6QMk3g600hfPnDd5HSAOCwkRiy1P+NnEpw/pKMjF/l39Zst ZDxq5SUhPo9lnNmC0ixily3Z3tFKOgmZ8ITMK8R2JzcTuyGNw6YptWjbohkntlpRvGNZMJ18 tq08lbMdCKYfsbrJLu62Zc7cYVOMtTtMModZjXJ5hwWMJ9uwus7d3bNmuzqzqW3mM5jVb+Ts 3IVbTmXhKspAggK0pwztE0f7R8puB0kc7WQiiSw6PMjOP0KiRLs/X65DRZ2n1IjhIRtTgZvZ greQEsXIYiVqxPIIGwsBGp/3FgoCRLFxYmmErzQ6TCxTIw6PbxWPDnkEVjoWy2cPpuYETse5 2NakGR86h8uNJY3xVz1FbY8kaouXJ+/5fdhbV6ZMNH6z79OV0z+Ga27FzZq55B1HPhcnXM9H /qLTq44pL43t8b+hu6JVs12Gbv1waGIDvmk863MhdMKrTZvYybhfW/F9pnIds+7wrHCqNTh8 x+fcp21IWbDI0ZaQykT/AXuz4Z3RAgAA 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)