From patchwork Thu Mar 12 07:44:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 5991591 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id F2EB6BF90F for ; Thu, 12 Mar 2015 07:50:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 248D820381 for ; Thu, 12 Mar 2015 07:50:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 317402034F for ; Thu, 12 Mar 2015 07:50:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753052AbbCLHpn (ORCPT ); Thu, 12 Mar 2015 03:45:43 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:64795 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753300AbbCLHpL (ORCPT ); Thu, 12 Mar 2015 03:45:11 -0400 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) 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 <0NL300EE99PNWG50@mailout2.w1.samsung.com>; Thu, 12 Mar 2015 07:48:59 +0000 (GMT) X-AuditID: cbfec7f5-b7fc86d0000066b7-db-55014365d67e Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 21.2C.26295.56341055; Thu, 12 Mar 2015 07:42:29 +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 <0NL300KWS9IOZC60@eusync2.samsung.com>; Thu, 12 Mar 2015 07:44:58 +0000 (GMT) From: Krzysztof Kozlowski To: Jiri Kosina , Henrik Rydberg , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Sebastian Reichel , Dmitry Eremin-Solenikov , David Woodhouse , linux-pm@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [RESEND PATCH v6 11/22] power_supply: bq2415x_charger: Use power_supply_*() API for accessing function attrs Date: Thu, 12 Mar 2015 08:44:09 +0100 Message-id: <1426146260-30081-12-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1426146260-30081-1-git-send-email-k.kozlowski@samsung.com> References: <1426146260-30081-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpjluLIzCtJLcpLzFFi42I5/e/4Fd1UZ8ZQgx3HeC0mPXnPbDFx5WRm i91zFrNYvH5haHHz0zdWi8u75rBZfO49wmhx4ts0JovTu0scOD0+r3rF6rFz1l12j80rtDw2 repk8+jbsorR48yCI+wenzfJBbBHcdmkpOZklqUW6dslcGVMvTWHteA3R8WHHY8ZGxhvsncx cnBICJhITPir18XICWSKSVy4t56ti5GLQ0hgKaPEq7+9rBBOH5PEvNZjTCBVbALGEpuXLwGr EhGYzyTRv+oEK0iCWcBQ4ue7P+wgtrBAuUTPpaWMIDaLgKrE0n3/2UBsXgEPiW0NW9gh1slJ nDw2mRXkCk6g+OtFPCBhIQF3iZnLPrFPYORdwMiwilE0tTS5oDgpPddIrzgxt7g0L10vOT93 EyMk7L7uYFx6zOoQowAHoxIPb0QfQ6gQa2JZcWXuIUYJDmYlEV4OK8ZQId6UxMqq1KL8+KLS nNTiQ4xMHJxSDYya03+6Wnm+UVW0O+lT1JBid/yUjri8vZj/jy91Um/2L9+rYLN+W4fM1Xzu r72ffIL8PunfmTotsdit7VdoDVebonxNt3ZTfaHSq8s2Vp6TTugU3rtmdTzqw6F0hvuPZ0i8 Dg0QCgq/drF7o7r4N41bDfEcczJ4dortX/R1ipPm/aDYZPWrRUosxRmJhlrMRcWJAIzVCIoZ AgAA Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@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 9b509025d687..d31ccc7935d0 100644 --- a/drivers/power/bq2415x_charger.c +++ b/drivers/power/bq2415x_charger.c @@ -809,7 +809,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;