From patchwork Fri Feb 14 11:49:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 24642 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f72.google.com (mail-yh0-f72.google.com [209.85.213.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 54850202B2 for ; Fri, 14 Feb 2014 11:59:05 +0000 (UTC) Received: by mail-yh0-f72.google.com with SMTP id f73sf27079190yha.3 for ; Fri, 14 Feb 2014 03:59:04 -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=uEL2lBi/0yZT766s5JqMrPf+gjlJLRgIBct6hrSy5i0=; b=dKhtRij1Ns9jQe+3I4oCu3VI6GmJVcZ54dbrqzmNaQhaUx3ed5crZHkKP3l9GDWv5+ tCjFOv03ikjZ/d3w7AiXAWhVRc/783XpZ4t6dRWiICIhjEqDHoXWeOppwiP/CRkY0OEN odesCtXdp4H17U05rsP0MVzM0/LEkrTX/Fp/PYBB4EnHaCkb1ogejrzxl7XsJmmiy5mR Nmd2zAKPSUq9ilvpjGOMOzRHCG3fO602071u2l4LXf0q+wRcC7BwpmZQmtlYEmRMbqCg JPixp+BntsTKflW3/mfkrt7nBLeX0u1h46LCE1QMn5H5WvNN51xq8Ii2NQaJw2ohmXyh X2kA== X-Gm-Message-State: ALoCoQlQAM/aMuNXIEbidCR/e/xlvAMNpHzxo21GQ/3VtJuCeFVNIbNNS4J+nrVygKvJdev+tuuw X-Received: by 10.236.191.136 with SMTP id g8mr2312420yhn.48.1392379144444; Fri, 14 Feb 2014 03:59:04 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.92.240 with SMTP id b103ls47898qge.57.gmail; Fri, 14 Feb 2014 03:59:04 -0800 (PST) X-Received: by 10.52.156.232 with SMTP id wh8mr1089103vdb.23.1392379144346; Fri, 14 Feb 2014 03:59:04 -0800 (PST) Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com [209.85.128.175]) by mx.google.com with ESMTPS id eb8si1828051vdb.73.2014.02.14.03.59.04 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Feb 2014 03:59:04 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.175 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.175; Received: by mail-ve0-f175.google.com with SMTP id c14so9448554vea.6 for ; Fri, 14 Feb 2014 03:59:04 -0800 (PST) X-Received: by 10.52.164.137 with SMTP id yq9mr809744vdb.33.1392379144053; Fri, 14 Feb 2014 03:59:04 -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 u4csp103004vcz; Fri, 14 Feb 2014 03:59:03 -0800 (PST) X-Received: by 10.68.130.234 with SMTP id oh10mr8556884pbb.136.1392379143137; Fri, 14 Feb 2014 03:59:03 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s4si5580644pbg.33.2014.02.14.03.59.02; Fri, 14 Feb 2014 03:59:02 -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 S1752569AbaBNLzu (ORCPT + 27 others); Fri, 14 Feb 2014 06:55:50 -0500 Received: from mail-pb0-f50.google.com ([209.85.160.50]:46232 "EHLO mail-pb0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752482AbaBNLzs (ORCPT ); Fri, 14 Feb 2014 06:55:48 -0500 Received: by mail-pb0-f50.google.com with SMTP id rq2so12324310pbb.9 for ; Fri, 14 Feb 2014 03:55:47 -0800 (PST) X-Received: by 10.69.0.10 with SMTP id au10mr8703625pbd.48.1392378947807; Fri, 14 Feb 2014 03:55:47 -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.45 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Feb 2014 03:55:47 -0800 (PST) From: Sachin Kamat To: linux-kernel@vger.kernel.org Cc: broonie@kernel.org, lgirdwood@gmail.com, sachin.kamat@linaro.org Subject: [PATCH 04/16] regulator: max8907: Use of_get_child_by_name Date: Fri, 14 Feb 2014 17:19:50 +0530 Message-Id: <1392378602-32302-4-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.175 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/max8907-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/max8907-regulator.c b/drivers/regulator/max8907-regulator.c index 0c5fe6c6ac26..afda8c6af721 100644 --- a/drivers/regulator/max8907-regulator.c +++ b/drivers/regulator/max8907-regulator.c @@ -231,7 +231,7 @@ static int max8907_regulator_parse_dt(struct platform_device *pdev) if (!np) return 0; - regulators = of_find_node_by_name(np, "regulators"); + regulators = of_get_child_by_name(np, "regulators"); if (!regulators) { dev_err(&pdev->dev, "regulators node not found\n"); return -EINVAL;