From patchwork Fri Feb 27 08:19:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 5899011 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 2D3E09F373 for ; Fri, 27 Feb 2015 08:26:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 51DD7201BB for ; Fri, 27 Feb 2015 08:26:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 630AC201DD for ; Fri, 27 Feb 2015 08:26:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755010AbbB0I0L (ORCPT ); Fri, 27 Feb 2015 03:26:11 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:46601 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754802AbbB0IUm (ORCPT ); Fri, 27 Feb 2015 03:20:42 -0500 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NKF00FF18P5T570@mailout2.w1.samsung.com>; Fri, 27 Feb 2015 08:24:41 +0000 (GMT) X-AuditID: cbfec7f4-b7f126d000001e9a-10-54f02846c3ac Received: from eusync1.samsung.com ( [203.254.199.211]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 67.AD.07834.64820F45; Fri, 27 Feb 2015 08:18:14 +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:39 +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 v5 09/20] power_supply: bq2415x_charger: Use power_supply_*() API for accessing function attrs Date: Fri, 27 Feb 2015 09:19:50 +0100 Message-id: <1425025201-15926-10-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: H4sIAAAAAAAAAyWRWUhUcRSH/c9d5jo1chuXrkJJUhGSGxmeJFIC80IvRvYiYY06qeDoMFdN W1wRctcsK7HSRh01lxoJM0czl8ltzFGTREeRsTD3PXHJbHw753e+j9/DoTBRE25DhYZHSuTh 4jA7UoD3/P066HDlzJKv82jbWcjSLvGgpDMdh6TdGRweTy1ioO7d4oNi0ArSip0htyIPg2RF LQn9NW6Q//4olC2/JqGxUIHD7LQLaJPm+DCx3oGgYXKehCc7Sh4om7MRqAzDBIysbBAw+KmQ hNXMdgSpawUkVLfr+ZD6rRiBcqsGh4GWon1jfo8EfXcHCW/V0xj09gwQUDBnDj3pBPQ0RkJT ig6DOtVTDDbfGQjP02z5ihM73tyGs9k1qwTbUKDns0vL/uzPnDw+W1duz07NKAlWVZlKsmPD apJd6Ovjs6+6rrGfX1btAyXxbEfGGM7+zt0mfaz9BBeDJGGh0RK506XbghBV43OebJuKWc+Y xBPQCD8NmVIM7cqk/6gjDmYrpn+8lkxDAkpElyJmoH6Dd7Bk8ZiyXo3RIOlzTJ2yxEhZ0BpT 5kt1ppHC6AHEGKa6jJQ5LWMSEjv3DxSF06eYzVqz/7GQZpmpQgN+UHec6dLkGatN9/OF3RdG VUR7M7XFf1AOEhYhk0pkKYkKlHEBwVIXR04s5aLCgx0DI6QqdPDytY9IoXFvRTSF7A4LPY8s +YoIcTQXK21FDIXZWQjR5KKvSBgkjr0nkUfckkeFSbhWxKNMbRKQz0nLodGK0ELdXY+H/lJZ /y9D24XkIu39lICGDze5Fi+1mautIqb0xA21Q6OH4U2LTOdqrvV61tm5kDTRHdcijHTPCL6q CfRLdLrzwHp2yDxO4hY5fJkbsz1kr83ck7kHqKpScr7H673P5+9kmeiv63yqSvrrPSJ0EY8C RCbHtHY4FyJ2scfknPgfLMiImtACAAA= 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 d7357cbc3e3e..7985e4b1fc7e 100644 --- a/drivers/power/bq2415x_charger.c +++ b/drivers/power/bq2415x_charger.c @@ -810,7 +810,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;