From patchwork Fri Feb 14 11:49:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 24631 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f197.google.com (mail-pd0-f197.google.com [209.85.192.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E955B202B2 for ; Fri, 14 Feb 2014 11:56:28 +0000 (UTC) Received: by mail-pd0-f197.google.com with SMTP id x10sf25238374pdj.0 for ; Fri, 14 Feb 2014 03:56:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=JfEU+BhDNgRALsEI7e88RD8eEDTZ2rNWE/m5yY6JeSs=; b=Pc/XPBGLQRxwFuT36P16j4D5JwC1GeDFvJiYQLS2rtC9KMybuXYjjOxAD59EiMMw65 k7gel0N4EdemJI/q0UK3POyt4YHwK7uS92t5axzYjZWlRvvgZN9htdcQ8hVF7pmzVXHS pkOS3mjaO6qBmEqKQP8CUoBzYyMWK7KLSPM6vBFOScfiYGuATQWHWDG5/yX9TxxQ7gSQ ZUEJF2C2CwUak5A845MAOaHKgc5GYkgxEgIOc6uqfm8WcIT5KpKtpREUrLgOQFBI3BgZ xWPUWgDNyvoDbbKp9PR4lQlj7TtnH/9iV+86LtO9Z3GtlE3/+2O/DntZpXN0NeRmrF5m gpHQ== X-Gm-Message-State: ALoCoQlIW+vwMtqvBx01UnlM5ogGRNQph8LBMnO929+37ndGe5fbr4041d221UHE+fNjhYBhgRV6 X-Received: by 10.66.252.1 with SMTP id zo1mr2950945pac.40.1392378988184; Fri, 14 Feb 2014 03:56:28 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.91.180 with SMTP id z49ls45217qgd.59.gmail; Fri, 14 Feb 2014 03:56:28 -0800 (PST) X-Received: by 10.52.95.233 with SMTP id dn9mr4329660vdb.3.1392378988061; Fri, 14 Feb 2014 03:56:28 -0800 (PST) Received: from mail-ve0-f174.google.com (mail-ve0-f174.google.com [209.85.128.174]) by mx.google.com with ESMTPS id xs6si1828933vec.78.2014.02.14.03.56.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Feb 2014 03:56:27 -0800 (PST) Received-SPF: temperror (google.com: error in processing during lookup of patch+caf_=patchwork-forward=linaro.org@linaro.org: DNS timeout) client-ip=209.85.128.174; Received: by mail-ve0-f174.google.com with SMTP id pa12so9456218veb.5 for ; Fri, 14 Feb 2014 03:56:27 -0800 (PST) X-Received: by 10.53.13.44 with SMTP id ev12mr4324103vdd.17.1392378987813; Fri, 14 Feb 2014 03:56:27 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp102863vcz; Fri, 14 Feb 2014 03:56:27 -0800 (PST) X-Received: by 10.68.44.71 with SMTP id c7mr8674252pbm.24.1392378986903; Fri, 14 Feb 2014 03:56:26 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id of8si5551644pbc.163.2014.02.14.03.56.25; Fri, 14 Feb 2014 03:56:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752680AbaBNLz7 (ORCPT + 27 others); Fri, 14 Feb 2014 06:55:59 -0500 Received: from mail-pd0-f173.google.com ([209.85.192.173]:48046 "EHLO mail-pd0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752643AbaBNLz4 (ORCPT ); Fri, 14 Feb 2014 06:55:56 -0500 Received: by mail-pd0-f173.google.com with SMTP id y10so11822790pdj.18 for ; Fri, 14 Feb 2014 03:55:56 -0800 (PST) X-Received: by 10.66.26.176 with SMTP id m16mr8615698pag.142.1392378956092; Fri, 14 Feb 2014 03:55:56 -0800 (PST) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id ix5sm16231160pbd.36.2014.02.14.03.55.53 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Feb 2014 03:55:55 -0800 (PST) From: Sachin Kamat To: linux-kernel@vger.kernel.org Cc: broonie@kernel.org, lgirdwood@gmail.com, sachin.kamat@linaro.org Subject: [PATCH 07/16] regulator: 88pm8607: Use of_get_child_by_name Date: Fri, 14 Feb 2014 17:19:53 +0530 Message-Id: <1392378602-32302-7-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1392378602-32302-1-git-send-email-sachin.kamat@linaro.org> References: <1392378602-32302-1-git-send-email-sachin.kamat@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: sachin.kamat@linaro.org X-Original-Authentication-Results: mx.google.com; spf=temperror (google.com: error in processing during lookup of patch+caf_=patchwork-forward=linaro.org@linaro.org: DNS timeout) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , of_find_node_by_name walks the allnodes list, and can thus walk outside of the parent node. Use of_get_child_by_name instead. Signed-off-by: Sachin Kamat --- drivers/regulator/88pm8607.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/88pm8607.c b/drivers/regulator/88pm8607.c index f704d83c93c4..fa99bfccaa6b 100644 --- a/drivers/regulator/88pm8607.c +++ b/drivers/regulator/88pm8607.c @@ -322,7 +322,7 @@ static int pm8607_regulator_dt_init(struct platform_device *pdev, nproot = of_node_get(pdev->dev.parent->of_node); if (!nproot) return -ENODEV; - nproot = of_find_node_by_name(nproot, "regulators"); + nproot = of_get_child_by_name(nproot, "regulators"); if (!nproot) { dev_err(&pdev->dev, "failed to find regulators node\n"); return -ENODEV;