From patchwork Fri Feb 14 11:49:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 24630 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f200.google.com (mail-vc0-f200.google.com [209.85.220.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C7717202B2 for ; Fri, 14 Feb 2014 11:56:10 +0000 (UTC) Received: by mail-vc0-f200.google.com with SMTP id le5sf25083867vcb.3 for ; Fri, 14 Feb 2014 03:56:03 -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=DwCxoO3/sRMVB//Uh12Z8b9agWTxLaknDpcKbiUFvTw=; b=akvz6oPYv8ISPoY3kwJ5Oc85bJ5diY3Utj9Ag5o+yAXFaqdTSoJQdlzhQKr7VLmjy+ PL0vbOk5xHY2QAlwAqSYHrFIB3vwZ0MMK+K1Ii/qKoWTjHWXvkIk5VDjnMA6ZmUqceIn rq7nhPWDf49qDv0vyw5HhWRB8kPFvRJ+ugnQR1QnI3atEay7yvs/MLk3JllDgChPphwl afJVpnplswGV2tGRXAKI6yo0jvl8c2KL+ZJ6E/mIhCXYNGz4gXP5cPU0a/laOs9/i7R/ 8dfk+Db0xqJV1238N1uP22RjCCtvGT5gqqVvm2wIIiSP0CEPJV27dgihvwkSEYrTh+/q iG+Q== X-Gm-Message-State: ALoCoQkfo7xBNWL3vJXbGlhKvQOGs9PY5AW47hi/qpraZalcInGICNIV7NG4rN59XGUV9lCx0pJr X-Received: by 10.224.49.72 with SMTP id u8mr2849114qaf.3.1392378963014; Fri, 14 Feb 2014 03:56:03 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.40.11 with SMTP id w11ls47378qgw.42.gmail; Fri, 14 Feb 2014 03:56:02 -0800 (PST) X-Received: by 10.220.191.134 with SMTP id dm6mr5239435vcb.16.1392378962930; Fri, 14 Feb 2014 03:56:02 -0800 (PST) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) by mx.google.com with ESMTPS id rl1si1829808vcb.74.2014.02.14.03.56.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Feb 2014 03:56:00 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.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.128.176; Received: by mail-ve0-f176.google.com with SMTP id jx11so2470553veb.35 for ; Fri, 14 Feb 2014 03:56:00 -0800 (PST) X-Received: by 10.52.107.35 with SMTP id gz3mr4325083vdb.8.1392378960689; Fri, 14 Feb 2014 03:56:00 -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 u4csp102840vcz; Fri, 14 Feb 2014 03:56:00 -0800 (PST) X-Received: by 10.66.193.202 with SMTP id hq10mr8496999pac.57.1392378959676; Fri, 14 Feb 2014 03:55:59 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ot3si5520691pac.311.2014.02.14.03.55.59; Fri, 14 Feb 2014 03:55:59 -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 S1752605AbaBNLzw (ORCPT + 27 others); Fri, 14 Feb 2014 06:55:52 -0500 Received: from mail-pb0-f46.google.com ([209.85.160.46]:43321 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752482AbaBNLzu (ORCPT ); Fri, 14 Feb 2014 06:55:50 -0500 Received: by mail-pb0-f46.google.com with SMTP id um1so12280988pbc.33 for ; Fri, 14 Feb 2014 03:55:50 -0800 (PST) X-Received: by 10.68.143.196 with SMTP id sg4mr8455200pbb.155.1392378950481; Fri, 14 Feb 2014 03:55:50 -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.48 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Feb 2014 03:55:49 -0800 (PST) From: Sachin Kamat To: linux-kernel@vger.kernel.org Cc: broonie@kernel.org, lgirdwood@gmail.com, sachin.kamat@linaro.org Subject: [PATCH 05/16] regulator: max8925: Use of_get_child_by_name Date: Fri, 14 Feb 2014 17:19:51 +0530 Message-Id: <1392378602-32302-5-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.128.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/max8925-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/max8925-regulator.c b/drivers/regulator/max8925-regulator.c index 759510789e71..5b939894bfc4 100644 --- a/drivers/regulator/max8925-regulator.c +++ b/drivers/regulator/max8925-regulator.c @@ -254,7 +254,7 @@ static int max8925_regulator_dt_init(struct platform_device *pdev, nproot = of_node_get(pdev->dev.parent->of_node); if (!nproot) return -ENODEV; - np = of_find_node_by_name(nproot, "regulators"); + np = of_get_child_by_name(nproot, "regulators"); if (!np) { dev_err(&pdev->dev, "failed to find regulators node\n"); return -ENODEV;