From patchwork Fri Jan 30 14:47:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 5751451 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 3043F9F302 for ; Fri, 30 Jan 2015 14:55:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4EE76202AE for ; Fri, 30 Jan 2015 14:55:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 476C7201CE for ; Fri, 30 Jan 2015 14:55:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932828AbbA3Oyi (ORCPT ); Fri, 30 Jan 2015 09:54:38 -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 S932918AbbA3Osf (ORCPT ); Fri, 30 Jan 2015 09:48:35 -0500 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) 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 <0NIZ00HL8VZHF680@mailout4.w1.samsung.com>; Fri, 30 Jan 2015 14:52:29 +0000 (GMT) X-AuditID: cbfec7f5-b7fc86d0000066b7-28-54cb992a7b20 Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id A9.68.26295.A299BC45; Fri, 30 Jan 2015 14:46:02 +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:28 +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 06/20] power_supply: ab8500: Use power_supply_*() API for accessing function attrs Date: Fri, 30 Jan 2015 15:47:44 +0100 Message-id: <1422629278-12202-7-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: H4sIAAAAAAAAAy2Ra0iTcRTG+++97NUavcxLbyP6sJJokHfoJGJ9iHyJAish6IM2dajhVDYV FUrzUkzN6dS8ZHlvTs3LhMpcrkwtnVPzVuElSouxnHnJEs1Mp9+e8zy/c54Ph8L4r3EBFR4Z I5FFiiOEpC1u+Pd29ISo2ODvqnvgCdnGBQ60FDURUP0uE4eUDTMOqtmfGOj617hQNeIIGRWu kKvJwyC1qomEocaTcL/lADxeLCOhvbQKhx8mNzCmzHHh80o3grYvFhLy/6o5oO5QItDOjBPw aek3ASMvSklYvteFQPGrhISJER4oBisQqNcacRh+Vb61YNkkYaqvm4R6nQmDfsMwASVzdmDI JMDQHgMv099j0KotwGC1eYY4c4xNS80i2dolF3a64w3OKhuXCbatZIrLLiwGsN9y8rhsa62I nTWrCVZbpyDZyXEdyc4PDHDZR72XWP3Dhi2gOontzprE/QTXbL1DJBHhcRKZi8912zBLyxoZ 3XAwvnBcxU1GzxwykA3F0J7McMEqvqMdmaHpJjID2VJ8ugYx85pCYjvg09kc5oMheFuTtAfT qq62Qva0xYbpydbh2wNGTyCmTafhbFN2dCgzOdFh1TjtxGieVlkv8WhfJrerd7fuMNPbk2f1 bWiWaTZ93W3zZZRjRWQO4pWjPXXIQRIbHC0PCpW6O8vFUnlsZKhzcJRUi3bevvIc1fR4dSKa QsJ9vI9igz+fEMfJE6SdiKEwoT0vX7Vl8ULECYkSWVSgLDZCIu9EHMpGkIzuKp5sftev+zkF JKH1vZXu582HYqMdiPzj0dLsdO+jqU66IKVofPHI0KkyZWhf4h/nc2dx1c2cy5V8rkhwOuvG 7at+1cG3hGlan84oL31+s9hojNcLrriY7riJLqZfqPcYm9cMUsXUKK4h8cCyTPeNifAlp/3q wK7N+lVz7ZIQl4eJ3USYTC7+DwUbjv3UAgAA 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 Acked-by: Linus Walleij Reviewed-by: Bartlomiej Zolnierkiewicz Reviewed-by: Sebastian Reichel --- drivers/power/ab8500_btemp.c | 2 +- drivers/power/ab8500_charger.c | 2 +- drivers/power/ab8500_fg.c | 2 +- drivers/power/abx500_chargalg.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/power/ab8500_btemp.c b/drivers/power/ab8500_btemp.c index d5683f503a4e..4d18464d6400 100644 --- a/drivers/power/ab8500_btemp.c +++ b/drivers/power/ab8500_btemp.c @@ -938,7 +938,7 @@ static int ab8500_btemp_get_ext_psy_data(struct device *dev, void *data) enum power_supply_property prop; prop = ext->properties[j]; - if (ext->get_property(ext, prop, &ret)) + if (power_supply_get_property(ext, prop, &ret)) continue; switch (prop) { diff --git a/drivers/power/ab8500_charger.c b/drivers/power/ab8500_charger.c index cee9b9e46825..f9eb7fff1d65 100644 --- a/drivers/power/ab8500_charger.c +++ b/drivers/power/ab8500_charger.c @@ -1957,7 +1957,7 @@ static int ab8500_charger_get_ext_psy_data(struct device *dev, void *data) enum power_supply_property prop; prop = ext->properties[j]; - if (ext->get_property(ext, prop, &ret)) + if (power_supply_get_property(ext, prop, &ret)) continue; switch (prop) { diff --git a/drivers/power/ab8500_fg.c b/drivers/power/ab8500_fg.c index 0e2c9d592a53..c957e8a41847 100644 --- a/drivers/power/ab8500_fg.c +++ b/drivers/power/ab8500_fg.c @@ -2200,7 +2200,7 @@ static int ab8500_fg_get_ext_psy_data(struct device *dev, void *data) enum power_supply_property prop; prop = ext->properties[j]; - if (ext->get_property(ext, prop, &ret)) + if (power_supply_get_property(ext, prop, &ret)) continue; switch (prop) { diff --git a/drivers/power/abx500_chargalg.c b/drivers/power/abx500_chargalg.c index 0da4415cbc10..ac6f4a22f846 100644 --- a/drivers/power/abx500_chargalg.c +++ b/drivers/power/abx500_chargalg.c @@ -1001,7 +1001,7 @@ static int abx500_chargalg_get_ext_psy_data(struct device *dev, void *data) * property because of handling that sysfs entry on its own, this is * the place to get the battery capacity. */ - if (!ext->get_property(ext, POWER_SUPPLY_PROP_CAPACITY, &ret)) { + if (!power_supply_get_property(ext, POWER_SUPPLY_PROP_CAPACITY, &ret)) { di->batt_data.percent = ret.intval; capacity_updated = true; } @@ -1019,7 +1019,7 @@ static int abx500_chargalg_get_ext_psy_data(struct device *dev, void *data) ext->type == POWER_SUPPLY_TYPE_USB) di->usb_chg = psy_to_ux500_charger(ext); - if (ext->get_property(ext, prop, &ret)) + if (power_supply_get_property(ext, prop, &ret)) continue; switch (prop) { case POWER_SUPPLY_PROP_PRESENT: