Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932382AbaJNMWd (ORCPT ); Tue, 14 Oct 2014 08:22:33 -0400 Received: from mailout3.w1.samsung.com ([210.118.77.13]:11201 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932126AbaJNMVG (ORCPT ); Tue, 14 Oct 2014 08:21:06 -0400 X-AuditID: cbfec7f5-b7f776d000003e54-b4-543d152f501e From: Krzysztof Kozlowski To: Linus Walleij , Samuel Ortiz , Lee Jones , Sebastian Reichel , Dmitry Eremin-Solenikov , David Woodhouse , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Cc: Anton Vorontsov , Guenter Roeck , Pavel Machek , Myungjoo Ham , Jonghwa Lee , Kyungmin Park , Marek Szyprowski , Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski Subject: [PATCH 4/8] power: ab8500: Use power_supply_*() API for accessing function attrs Date: Tue, 14 Oct 2014 14:20:42 +0200 Message-id: <1413289246-31650-5-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1413289246-31650-1-git-send-email-k.kozlowski@samsung.com> References: <1413289246-31650-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrKLMWRmVeSWpSXmKPExsVy+t/xq7r6orYhBhufSFoc3KppsXHGelaL SU/eM1tMXDmZ2aLz7BNmi9cvDC3ONr1ht7j/9SijxZQ/y5ksNj2+xmpxedccNovPvUcYLZ4s PMNksfbIXXaL240r2CzunjrKZnG6m9Xi9O4SByGPCf2fGD12zrrL7rF5hZbHplWdbB53ru1h 85h3MtBj85J6j53fG9g9+rasYvRYsfo7u8fnTXIB3FFcNimpOZllqUX6dglcGd3L+tgKNolX LFndydjAeFW4i5GTQ0LARGLmq21sELaYxIV768FsIYGljBI3tmp2MXIB2X1MEr3TV4Il2ASM JTYvX8IGkhARuM4k0bliAguIwyzQyCzxrqGZCaRKWCBaYteLu2AdLAKqEk+XXGAEsXkF3CVe 3+lgh1gnJ3Hy2GRWEJtTwENi5aIjLBCr3SXaT95mm8DIu4CRYRWjaGppckFxUnqukV5xYm5x aV66XnJ+7iZGSNB/3cG49JjVIUYBDkYlHt6CSJsQIdbEsuLK3EOMEhzMSiK8Chy2IUK8KYmV ValF+fFFpTmpxYcYmTg4pRoYWTM3LY662f74y6IyfdXdPqrOp+0ab5UwN+5/cW3vbG/BCMfO xgMCPNf3cPruVtu01sP9NPN8VsnQwGc5+Xs6lLRUmTkqPP811aWIZW+9HZjEtCPdXZolamp9 lfSvyKOX3haGZP3z7167M7vPe0vn4U23+uRnGe94I1DJw/tyWuFj+9gSrSwlluKMREMt5qLi RADRe8xTWAIAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Replace direct calls to power supply function attributes with wrappers. Wrappers provide safe access 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 --- 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 7f9a4547dccd..8161960ee78c 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 19110aa613a1..38d61523227f 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 217da4b2ca86..ed2aca42f968 100644 --- a/drivers/power/ab8500_fg.c +++ b/drivers/power/ab8500_fg.c @@ -2199,7 +2199,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 6d2723664a01..f3d9dbac3568 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: -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/