From patchwork Fri Feb 27 08:19:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 5898871 Return-Path: X-Original-To: patchwork-linux-arm@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 E2B6F9F373 for ; Fri, 27 Feb 2015 08:25:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 032A8201CE for ; Fri, 27 Feb 2015 08:25:45 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8A56F201BB for ; Fri, 27 Feb 2015 08:25:43 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YRGCP-0001Cr-64; Fri, 27 Feb 2015 08:23:05 +0000 Received: from mailout3.w1.samsung.com ([210.118.77.13]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YRGAH-0008Vp-BS for linux-arm-kernel@lists.infradead.org; Fri, 27 Feb 2015 08:20:55 +0000 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) 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 <0NKF00BEM8P3WJ70@mailout3.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Fri, 27 Feb 2015 08:24:39 +0000 (GMT) X-AuditID: cbfec7f5-b7fc86d0000066b7-79-54f0283e815c Received: from eusync1.samsung.com ( [203.254.199.211]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id F9.77.26295.E3820F45; Fri, 27 Feb 2015 08:18:06 +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:35 +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 Subject: [PATCH v5 06/20] power_supply: ab8500: Use power_supply_*() API for accessing function attrs Date: Fri, 27 Feb 2015 09:19:47 +0100 Message-id: <1425025201-15926-7-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: H4sIAAAAAAAAAyWRaUjTcRzG++1/TWn0d5r98kWQUIaUR0l9SwkJ0R+96LSIomPpcpVT2VJS ECMJdN55QENTcbV5NGsDyzwyj6Wpy4NCKw1xgdfm1A5Zmrl893l4nofnxSOkxC20l/Bm3B2p Ik4S68260r1/3w3vO7rHHhmg+RwIuf12AWi6s2i4vzpDw0PLPAXNfQ4OqoY9QVUZAAXVhRSk V9WzMKA/BCUvtsHThXIWmkqraJidCoT++3McfPvZhaBxwspC0YpWANrWPASGyU8MjC7+YmD4 dSkLSzmdCDJ/qFl41jnGQeaHSgRah56GobaK9YZ1jYWx910s1DZPUdDXO8SAes4derMY6G26 Ay0PBikwGoopWH4+yYTuJrpFfzLe2kGTPP0SQxrVYxyxL1wh3/MLOWLU+RLLjJYhhppMlnz9 1MwSm9nMkcc9p8mbsrr1gCaNdGV/pcl0wR/21PaLriHR0tibSVKF/9FrrjK1Y4BJqNt+d3qt gbuHXm5VIRch5oPwiK1WsMGeeGC8nnWymH+CsLkxSIVc1zlXgPXqYtppsPwBbNRqWKfhwZtc 8NtnOQKnoPghhCctPZwz5c7H4LmPrf8bNL8LL5aPU04W8RH4i7UAbcztwD2mQsbJLjzBttVH 3MZ0BK6v/I3ykagCbapBW6WJUQnK6zHy/X5KiVyZGBfjFxUvN6CNy3++Qk9MR9oRL0Tem0UE 2yPFjCRJmSxvR1hIeXuI0MR8pFgULUlOkSriryoSY6XKdiQQunjdQ5nLWSd7BkPdHp5xVGPZ oAbvMTRYLNkjqWkhnaU+QV9UYY98otOiLoQdPHs+9fIlt+EOFKpTHj+sCba2z9yO786Q3Zhe PTaanH02I202d2XBqyzF0fajZOLEyeN7Td068/NbJarqLSWT6YpD1nC/nbW2c7J943uLZMHy NmPKSPh+b1opkwT6Ugql5B+g2iY90AIAAA== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150227_002053_576875_CD57215F X-CRM114-Status: GOOD ( 10.95 ) X-Spam-Score: -5.0 (-----) Cc: Krzysztof Kozlowski , Thomas Gleixner , Kyungmin Park , Pavel Machek , Marek Szyprowski X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 b3fddc71da1e..7f75c355efe3 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: