From patchwork Fri Feb 14 11:49:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 24636 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f198.google.com (mail-ob0-f198.google.com [209.85.214.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id F019C202B2 for ; Fri, 14 Feb 2014 11:56:35 +0000 (UTC) Received: by mail-ob0-f198.google.com with SMTP id wp4sf45041998obc.1 for ; Fri, 14 Feb 2014 03:56:35 -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=TQnBfm8227ZWexDetGz9r6lsFXLne3UxHYfvMOxkXtU=; b=Yzrdoy6zwpCexjCI2weL84zfpD/zIfEtlnl6T44T7u0ddRce64Ncz0aUFtIpgmtbe0 oCPfUrWlMjnlNdkmJmOM4NL5cgjTwugHbhcMLnVAu6PdqrZ1DBVhyeoBjUjWxUouoCC7 qxokc2YpVnMnBHgSpPtbOOqsean5Jad3F5bl/q04pclT1WVvrQIiSAI6Vlm0Rw4OAxyz 6dESiyefnISxEQMxsksdJUzJDzI52jh7GRbwNC5UgsdWGTZCGxV8Y5utC0Y4Uc5WIhOZ IvXwnmnOngO07YfAme5vze0ZumXGA1yeLzRRfo0pDaoAEAfvbmd09VNivrhDGhYPulq7 ThvQ== X-Gm-Message-State: ALoCoQmw1zn5e6vZjI24Y7AcQ5p/Q/4H0XSjTZ32/BjoMN6lFZoaNBiUVAH4CpGbkL90ZNHNtDWp X-Received: by 10.182.116.39 with SMTP id jt7mr2801515obb.33.1392378995021; Fri, 14 Feb 2014 03:56:35 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.85.35 with SMTP id m32ls45343qgd.81.gmail; Fri, 14 Feb 2014 03:56:34 -0800 (PST) X-Received: by 10.52.157.8 with SMTP id wi8mr532579vdb.46.1392378994897; Fri, 14 Feb 2014 03:56:34 -0800 (PST) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by mx.google.com with ESMTPS id be7si1836422vcb.35.2014.02.14.03.56.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Feb 2014 03:56:34 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.176; Received: by mail-vc0-f176.google.com with SMTP id la4so9278063vcb.35 for ; Fri, 14 Feb 2014 03:56:34 -0800 (PST) X-Received: by 10.220.11.141 with SMTP id t13mr943885vct.30.1392378994697; Fri, 14 Feb 2014 03:56:34 -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 u4csp102872vcz; Fri, 14 Feb 2014 03:56:34 -0800 (PST) X-Received: by 10.68.134.8 with SMTP id pg8mr8789021pbb.84.1392378993771; Fri, 14 Feb 2014 03:56:33 -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.31; Fri, 14 Feb 2014 03:56:31 -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 S1752799AbaBNL4R (ORCPT + 27 others); Fri, 14 Feb 2014 06:56:17 -0500 Received: from mail-pd0-f172.google.com ([209.85.192.172]:33021 "EHLO mail-pd0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752749AbaBNL4O (ORCPT ); Fri, 14 Feb 2014 06:56:14 -0500 Received: by mail-pd0-f172.google.com with SMTP id p10so11846472pdj.17 for ; Fri, 14 Feb 2014 03:56:14 -0800 (PST) X-Received: by 10.69.31.65 with SMTP id kk1mr8614800pbd.47.1392378974067; Fri, 14 Feb 2014 03:56:14 -0800 (PST) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id ix5sm16231160pbd.36.2014.02.14.03.56.11 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Feb 2014 03:56:13 -0800 (PST) From: Sachin Kamat To: linux-kernel@vger.kernel.org Cc: broonie@kernel.org, lgirdwood@gmail.com, sachin.kamat@linaro.org Subject: [PATCH 13/16] regulator: mc13xxx: Use of_get_child_by_name Date: Fri, 14 Feb 2014 17:19:59 +0530 Message-Id: <1392378602-32302-13-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=neutral (google.com: 209.85.220.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) 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/mc13xxx-regulator-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/mc13xxx-regulator-core.c b/drivers/regulator/mc13xxx-regulator-core.c index da4859282302..4498a3f0733d 100644 --- a/drivers/regulator/mc13xxx-regulator-core.c +++ b/drivers/regulator/mc13xxx-regulator-core.c @@ -168,7 +168,7 @@ int mc13xxx_get_num_regulators_dt(struct platform_device *pdev) int num; of_node_get(pdev->dev.parent->of_node); - parent = of_find_node_by_name(pdev->dev.parent->of_node, "regulators"); + parent = of_get_child_by_name(pdev->dev.parent->of_node, "regulators"); if (!parent) return -ENODEV; @@ -188,7 +188,7 @@ struct mc13xxx_regulator_init_data *mc13xxx_parse_regulators_dt( int i, parsed = 0; of_node_get(pdev->dev.parent->of_node); - parent = of_find_node_by_name(pdev->dev.parent->of_node, "regulators"); + parent = of_get_child_by_name(pdev->dev.parent->of_node, "regulators"); if (!parent) return NULL;