From patchwork Mon Feb 23 11:47:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 5864791 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 A6A619F169 for ; Mon, 23 Feb 2015 11:54:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CA73920615 for ; Mon, 23 Feb 2015 11:54:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C5BCD2062A for ; Mon, 23 Feb 2015 11:54:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752201AbbBWLxy (ORCPT ); Mon, 23 Feb 2015 06:53:54 -0500 Received: from mailout3.w1.samsung.com ([210.118.77.13]:54130 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752445AbbBWLsK (ORCPT ); Mon, 23 Feb 2015 06:48:10 -0500 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 <0NK800FKL3MZTOA0@mailout3.w1.samsung.com>; Mon, 23 Feb 2015 11:52:12 +0000 (GMT) X-AuditID: cbfec7f4-b7f126d000001e9a-f6-54eb12e68484 Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id D2.5A.07834.6E21BE45; Mon, 23 Feb 2015 11:45:42 +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 <0NK8001843FJ0A90@eusync2.samsung.com>; Mon, 23 Feb 2015 11:48:07 +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 Cc: Thomas Gleixner , Pavel Machek , Kyungmin Park , Marek Szyprowski , Krzysztof Kozlowski Subject: [PATCH v4 09/20] power_supply: bq2415x_charger: Use power_supply_*() API for accessing function attrs Date: Mon, 23 Feb 2015 12:47:30 +0100 Message-id: <1424692061-30624-10-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1424692061-30624-1-git-send-email-k.kozlowski@samsung.com> References: <1424692061-30624-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAAy2RaUjTcRjH++1/Olv9m2Z/DXoxUkjyIqEHSQmi+vumUyx6YS1dKjgdm1pK pGiC95EmIZrKpvPImVNC88h0mua8ZgiaJ07TqeVVeHTN4933+3m+z/N98dCYsBm3o4NDwyXy UHGIiOTjPX8/fXGaEy76uG4ZHCC9d4UHqq4UHOL+mHB4YfyBQZN+mwLlkA0kF7tCVnk2BvHK ahIGNOcht+YElK4WktCYr8Rhcd4NeuOWKJj82YGgYXqZhJzfah6oWzIQaGeGCRhZ+0XA0Pt8 EtbTdAiSNvJIqNKNU5DUX4xAva3BwdBaZN5Y/kfC+OcOEiqb5jHQ9xgIyFuygp4UAnoaw6E5 YRCDWu1LDDbfzhAXHbiyNRduoqUd5zI06wTXkDdOcSurftxsZjbF1ZY5ckaTmuC0FUkkNzbc RHLf+/oo7nX3Te5DwRtzQBXDdaSO4dxC1g55w/Ye/0KAJCQ4UiJ38XrADxpR1yHZDv2kpP8V FYtGqGRkQbOMO1vf132gbdiBiWoyGfFpIVOC2ClN5YFJ57H65Tq0myKZc2ytWrU3sGY6LdiP VWm8XYMxBsTOGPdvWTEytq3IQO5qnLFnZ5NT97iA4didhFpiv+8U292ZbdY0bWHmk+8id7GQ ucqm1eSgTCQoQocq0HFJhL9M8TBQ6uasEEsVEaGBzv5hUi3af/lGPVJ2erQhhkaiw4KpSJOP kBBHKqKkbYilMZG14OSWGQkCxFHREnnYfXlEiETRhni0hV0siuPP+9Xk5hR0pRv1C1a6fDuI CJ59rnl8XZg9OSzwLJNtepyddjWYnsV49qds3lo6Wm6YpVbH5lqdvpbcvqO9NH9lvL0Fjdnb eqksveNxywJndrD49NO7Jnvq21xojqy0YNT3DBI7btpqOh4lXrus0xWO8hOPbUu9faOPZLmL RLgiSOzmiMkV4v/BlUtC0AIAAA== 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/bq2415x_charger.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/power/bq2415x_charger.c b/drivers/power/bq2415x_charger.c index 73b0a8521803..bc47a265b304 100644 --- a/drivers/power/bq2415x_charger.c +++ b/drivers/power/bq2415x_charger.c @@ -816,7 +816,8 @@ static int bq2415x_notifier_call(struct notifier_block *nb, dev_dbg(bq->dev, "notifier call was called\n"); - ret = psy->get_property(psy, POWER_SUPPLY_PROP_CURRENT_MAX, &prop); + ret = power_supply_get_property(psy, POWER_SUPPLY_PROP_CURRENT_MAX, + &prop); if (ret != 0) return NOTIFY_OK;