From patchwork Thu Mar 12 07:44:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 5991661 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 AF10D9F2A9 for ; Thu, 12 Mar 2015 07:50:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EC8202034B for ; Thu, 12 Mar 2015 07:50:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 04150200CF for ; Thu, 12 Mar 2015 07:50:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753562AbbCLHpb (ORCPT ); Thu, 12 Mar 2015 03:45:31 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:64795 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753270AbbCLHpJ (ORCPT ); Thu, 12 Mar 2015 03:45:09 -0400 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NL300EEZ9PMCU50@mailout2.w1.samsung.com>; Thu, 12 Mar 2015 07:48:58 +0000 (GMT) X-AuditID: cbfec7f5-b7fc86d0000066b7-d7-55014364cc71 Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 50.2C.26295.46341055; Thu, 12 Mar 2015 07:42:28 +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:44:58 +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 10/22] power_supply: apm_power: Use power_supply_*() API for accessing function attrs Date: Thu, 12 Mar 2015 08:44:08 +0100 Message-id: <1426146260-30081-11-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+NgFmpjluLIzCtJLcpLzFFi42I5/e/4Fd0UZ8ZQg81PZSwmPXnPbDFx5WRm i91zFrNYvH5haHHz0zdWi8u75rBZfO49wmhx4ts0JovTu0scOD0+r3rF6rFz1l12j80rtDw2 repk8+jbsorR48yCI+wenzfJBbBHcdmkpOZklqUW6dslcGXMvfmYreATZ8W7//tZGhgPcHQx cnJICJhIfH/+jQnCFpO4cG89WxcjF4eQwFJGieZHbVBOH5PEvNZjYFVsAsYSm5cvAUuICMxn kuhfdYIVJMEsYCjx890f9i5GDg5hgUKJrkdOIGEWAVWJ6593sYHYvAIeEi83b2GH2CYncfLY ZFaQck6g+OtFPCBhIQF3iZnLPrFPYORdwMiwilE0tTS5oDgpPddIrzgxt7g0L10vOT93EyMk 7L7uYFx6zOoQowAHoxIPb0QfQ6gQa2JZcWXuIUYJDmYlEV4OK8ZQId6UxMqq1KL8+KLSnNTi Q4xMHJxSDYzcv1urZnbciSiYFL24wvO6WLeIQPUaqeUBjhc2Vys4B29/bs/ruf3AsaVTTtd+ dJv71S1SP/7ygi4TP1+17JY4HRsJsR67Obb1i+vlXuSvvPp9tq/vmXNPft+z2n783+Ns7jPC UVu5jv84wtN27dwNxv5q861ymcxnOH1ynh5piz9+6E9jTKcSS3FGoqEWc1FxIgCJpOhDGQIA AA== 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 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)