From patchwork Thu Aug 25 07:19:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wenyou Yang X-Patchwork-Id: 9298795 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A96CA60757 for ; Thu, 25 Aug 2016 07:22:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 93D22291FE for ; Thu, 25 Aug 2016 07:22:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8835129200; Thu, 25 Aug 2016 07:22:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3CEC5291FE for ; Thu, 25 Aug 2016 07:22:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757487AbcHYHVq (ORCPT ); Thu, 25 Aug 2016 03:21:46 -0400 Received: from eusmtp01.atmel.com ([212.144.249.242]:59273 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753607AbcHYHVp (ORCPT ); Thu, 25 Aug 2016 03:21:45 -0400 Received: from apsmtp01.atmel.com (10.168.254.31) by eusmtp01.atmel.com (10.145.145.30) with Microsoft SMTP Server id 14.3.235.1; Thu, 25 Aug 2016 09:21:38 +0200 Received: from shaarm01.corp.atmel.com (10.168.254.13) by apsmtp01.atmel.com (10.168.254.31) with Microsoft SMTP Server id 14.3.235.1; Thu, 25 Aug 2016 15:28:44 +0800 From: Wenyou Yang To: Sebastian Reichel , Dmitry Eremin-Solenikov , David Woodhouse , Rob Herring , Pawel Moll , Mark Brown , Ian Campbell , "Kumar Gala" , Lee Jones , Nicolas Ferre , Alexandre Belloni CC: , , , , "Wenyou Yang" Subject: [PATCH v8 02/11] power: act8945a_charger: Achieve properties from its node Date: Thu, 25 Aug 2016 15:19:50 +0800 Message-ID: <1472109599-21915-3-git-send-email-wenyou.yang@atmel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1472109599-21915-1-git-send-email-wenyou.yang@atmel.com> References: <1472109599-21915-1-git-send-email-wenyou.yang@atmel.com> MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since the act8945a_charger is regarded as a sub-device, all properties will be assigned to its own device node. All properties can be achieved from its own node, instead of from its parent device. Signed-off-by: Wenyou Yang --- Changes in v8: None Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None drivers/power/supply/act8945a_charger.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/power/supply/act8945a_charger.c b/drivers/power/supply/act8945a_charger.c index b5c00e4..3f486c9 100644 --- a/drivers/power/supply/act8945a_charger.c +++ b/drivers/power/supply/act8945a_charger.c @@ -328,11 +328,11 @@ static int act8945a_charger_probe(struct platform_device *pdev) return -EINVAL; } - ret = act8945a_charger_config(pdev->dev.parent, charger); + ret = act8945a_charger_config(&pdev->dev, charger); if (ret) return ret; - psy_cfg.of_node = pdev->dev.parent->of_node; + psy_cfg.of_node = pdev->dev.of_node; psy_cfg.drv_data = charger; psy = devm_power_supply_register(&pdev->dev,