From patchwork Mon Nov 12 09:59:52 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 1727451 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 426D5DFE80 for ; Mon, 12 Nov 2012 10:44:06 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TXrTG-0002hK-IY; Mon, 12 Nov 2012 10:42:26 +0000 Received: from ch1ehsobe006.messaging.microsoft.com ([216.32.181.186] helo=ch1outboundpool.messaging.microsoft.com) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TXrTC-0002f4-FB for linux-arm-kernel@lists.infradead.org; Mon, 12 Nov 2012 10:42:23 +0000 Received: from mail196-ch1-R.bigfish.com (10.43.68.240) by CH1EHSOBE015.bigfish.com (10.43.70.65) with Microsoft SMTP Server id 14.1.225.23; Mon, 12 Nov 2012 10:42:20 +0000 Received: from mail196-ch1 (localhost [127.0.0.1]) by mail196-ch1-R.bigfish.com (Postfix) with ESMTP id 8F9052602B3; Mon, 12 Nov 2012 10:42:20 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 0 X-BigFish: VS0(zzzz1de0h1202h1d1ah1d2ahzz8275bhz2dh2a8h668h839he5bhf0ah107ah11b5h121eh1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h14afh1504h1537h1155h) Received: from mail196-ch1 (localhost.localdomain [127.0.0.1]) by mail196-ch1 (MessageSwitch) id 1352716938503726_5835; Mon, 12 Nov 2012 10:42:18 +0000 (UTC) Received: from CH1EHSMHS019.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.250]) by mail196-ch1.bigfish.com (Postfix) with ESMTP id 76CC1200137; Mon, 12 Nov 2012 10:42:18 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CH1EHSMHS019.bigfish.com (10.43.70.19) with Microsoft SMTP Server (TLS) id 14.1.225.23; Mon, 12 Nov 2012 10:42:18 +0000 Received: from tx30smr01.am.freescale.net (10.81.153.31) by 039-SN1MMR1-005.039d.mgd.msft.net (10.84.1.17) with Microsoft SMTP Server (TLS) id 14.2.318.3; Mon, 12 Nov 2012 10:42:17 +0000 Received: from shlinux1.ap.freescale.net (shlinux1.ap.freescale.net [10.192.225.216]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id qACAgFw4013392; Mon, 12 Nov 2012 03:42:16 -0700 Received: by shlinux1.ap.freescale.net (Postfix, from userid 1013) id 991791AE0C5; Mon, 12 Nov 2012 17:59:53 +0800 (CST) From: Frank Li To: , , , Subject: [PATCH 2/2] regulator: gpio-regulator: fix can't find regulator node in dt Date: Mon, 12 Nov 2012 17:59:52 +0800 Message-ID: <1352714392-30497-1-git-send-email-Frank.Li@freescale.com> X-Mailer: git-send-email 1.7.1 MIME-Version: 1.0 X-OriginatorOrg: freescale.net X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121112_054222_889568_E252F306 X-CRM114-Status: GOOD ( 10.58 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [216.32.181.186 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Frank Li X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Need initilize of_node in regulator config when register regulator, otherwise regulator driver think it is no-dt device. in regulator_dev_lookup list_for_each_entry(r, ®ulator_list, list) if (r->dev.parent && node == r->dev.of_node) return r r->dev.of_noe will be zero if miss config in cfg. Signed-off-by: Frank Li --- drivers/regulator/gpio-regulator.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/regulator/gpio-regulator.c b/drivers/regulator/gpio-regulator.c index e467d0a..faa2f71 100644 --- a/drivers/regulator/gpio-regulator.c +++ b/drivers/regulator/gpio-regulator.c @@ -303,6 +303,7 @@ static int __devinit gpio_regulator_probe(struct platform_device *pdev) cfg.dev = &pdev->dev; cfg.init_data = config->init_data; cfg.driver_data = drvdata; + cfg.of_node = np; if (config->enable_gpio >= 0) cfg.ena_gpio = config->enable_gpio;