From patchwork Tue Mar 10 08:27:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 5975181 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 D19D6BF440 for ; Tue, 10 Mar 2015 08:35:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0CA17200EC for ; Tue, 10 Mar 2015 08:35:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 35E7C2024D for ; Tue, 10 Mar 2015 08:35:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752406AbbCJIfD (ORCPT ); Tue, 10 Mar 2015 04:35:03 -0400 Received: from mailout3.w1.samsung.com ([210.118.77.13]:34146 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752271AbbCJI2F (ORCPT ); Tue, 10 Mar 2015 04:28:05 -0400 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 <0NKZ0031JMDEGL10@mailout3.w1.samsung.com>; Tue, 10 Mar 2015 08:32:02 +0000 (GMT) X-AuditID: cbfec7f4-b7f126d000001e9a-1a-54feaa7d0c59 Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id EF.CC.07834.D7AAEF45; Tue, 10 Mar 2015 08:25:33 +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:27:58 +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 10/22] power_supply: apm_power: Use power_supply_*() API for accessing function attrs Date: Tue, 10 Mar 2015 09:27:14 +0100 Message-id: <1425976046-20973-11-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: H4sIAAAAAAAAAyWRfSzUcRzH+97v4X7k1m9H/KatP86iaZ568pla6Q/1pdlq6Y/0oIubhzns DiVaNxuF8pBUTI1oJ+UhZ3lMF450mIexrpzoqEseistQkct/r9d7r+3zx4chhBWkPRMeFSuR RYkjRbQlqV3tHHa5Vr4a4N7+UQiZPT94UPo2g4Tkv1Mk3JmYI6C5e4UPJYO2kF7sDjlPcwno q/SEey/soKmwhITvRg/oSZ7mw6dfGgQN4zM03P2j5IGyJQtBjWGYAt38IgWDjYU0LNxuR5Bm KqChol3PB+VKJQkD6qL1eGaNBv07DQ3Pmo0EdGsHKCiYtgZtBgXaplh4ldJPgKomj4ClagPl 7YDL5t3waEsbibMqFyjcUKDn48nsXD5WlTnjmvI0Go8MN9N4treXjx91ncSq0utYc2uExN9y ftN4rmWIxrVDN0icWVuOTtgGWh4MkUSGx0tkbocuWoY91BnomHmLK7Nrr0kFUjPpyILh2L3c 2E01b4Ntub7RKjodWTJC9gniMpbbyA3J5HFVuUu0uaLZPZxKWfq/smE1DLcyZ+SbhWAHEGeY 6FoXhrFmI7ja3m1mJNkd3LDO0YwCFnP5hoiNY9u5ro5cyswW67PJ9IE0s5A9xukHfqJsJChC m8rRVklccIz8UqjUw1UulsrjokJdg6OlNWjjxaZ6VNLh1YpYBomsBLqzqwFCShwvT5C2Io4h RDYCTdb6JAgRJ1yVyKKDZHGREnkr4jEW9gr04HyxY312ysiaze483gEfheOXpM6KzvyxRMem U35eqcddQvg9JvW8M6kLbPY/WrLz8uj+0+0+NpOLj223nFN9tkv1866rhqCyM4lO+6Ip4YWi jl19LzcntcxMHXFqVNR9fc+KTId9lU0Z/fI3fgarUqPSP/P+uK7AYWLhudbXc1lEysPEHs6E TC7+Bx2OJw3AAgAA 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)