From patchwork Fri Feb 14 11:49:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 24641 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f197.google.com (mail-ie0-f197.google.com [209.85.223.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B121C202B2 for ; Fri, 14 Feb 2014 11:58:29 +0000 (UTC) Received: by mail-ie0-f197.google.com with SMTP id rd18sf8492063iec.8 for ; Fri, 14 Feb 2014 03:58: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=SuIt5Ivdf39RN3FDjDjV1T0jRWMLRyIo4tIEKRFLVa4=; b=Edy32R/pxEzg5la36jQlX7CLFawZJeVljabAx9P1NMY+HoPCKrEsBZ3Ftd1/u5N7wd MeVMXceOirptDP+Z4n8RSKBa50fr23AOaHLZjrFhzk2AwkmuDi3Texu2Jgzgd0rV57UN hrMqSJlKAMIAhYCIrlqUPQ7G+UhjNn0MskwA78qECCWxEuri2sMBjgr9wPHRiUcgPJ1a jWA7Ydgc6eVpxELD/lGCv2uciMgT7sRXBMxIf7xVlZB03tsmjHaWwv/Q2SaqniASjDo0 0S2VM19rE5M4yosOhv2kcJOnjGXrnbBjCd8j6YkbefAr8wf+CEt+B+qRYpj5J5AMfPkz 4tAw== X-Gm-Message-State: ALoCoQlsRWeHldQtrMgfl654JhqtxSwEoTypeuoKnZWG+Zs5bnNMU0zqdh4p8YaS8o3C2fgGaE3L X-Received: by 10.183.3.36 with SMTP id bt4mr2877771obd.29.1392379108854; Fri, 14 Feb 2014 03:58:28 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.29.134 with SMTP id b6ls45941qgb.91.gmail; Fri, 14 Feb 2014 03:58:28 -0800 (PST) X-Received: by 10.52.171.39 with SMTP id ar7mr4304882vdc.5.1392379108743; Fri, 14 Feb 2014 03:58:28 -0800 (PST) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id yv5si1818653veb.140.2014.02.14.03.58.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Feb 2014 03:58:28 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.172 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.172; Received: by mail-vc0-f172.google.com with SMTP id lf12so9398165vcb.3 for ; Fri, 14 Feb 2014 03:58:28 -0800 (PST) X-Received: by 10.220.95.139 with SMTP id d11mr955211vcn.21.1392379108467; Fri, 14 Feb 2014 03:58:28 -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 u4csp102976vcz; Fri, 14 Feb 2014 03:58:27 -0800 (PST) X-Received: by 10.68.37.42 with SMTP id v10mr8432165pbj.127.1392379107514; Fri, 14 Feb 2014 03:58:27 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ot3si5540511pac.253.2014.02.14.03.58.26; Fri, 14 Feb 2014 03:58:26 -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 S1752904AbaBNL6U (ORCPT + 27 others); Fri, 14 Feb 2014 06:58:20 -0500 Received: from mail-pa0-f49.google.com ([209.85.220.49]:44781 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752644AbaBNLz7 (ORCPT ); Fri, 14 Feb 2014 06:55:59 -0500 Received: by mail-pa0-f49.google.com with SMTP id hz1so12174582pad.36 for ; Fri, 14 Feb 2014 03:55:58 -0800 (PST) X-Received: by 10.66.66.66 with SMTP id d2mr8550730pat.80.1392378958670; Fri, 14 Feb 2014 03:55:58 -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.56 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Feb 2014 03:55:58 -0800 (PST) From: Sachin Kamat To: linux-kernel@vger.kernel.org Cc: broonie@kernel.org, lgirdwood@gmail.com, sachin.kamat@linaro.org Subject: [PATCH 08/16] regulator: act8865: Use of_get_child_by_name Date: Fri, 14 Feb 2014 17:19:54 +0530 Message-Id: <1392378602-32302-8-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.172 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/act8865-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/act8865-regulator.c b/drivers/regulator/act8865-regulator.c index 084cc0819a52..c9f98b061307 100644 --- a/drivers/regulator/act8865-regulator.c +++ b/drivers/regulator/act8865-regulator.c @@ -213,7 +213,7 @@ static int act8865_pdata_from_dt(struct device *dev, struct device_node *np; struct act8865_regulator_data *regulator; - np = of_find_node_by_name(dev->of_node, "regulators"); + np = of_get_child_by_name(dev->of_node, "regulators"); if (!np) { dev_err(dev, "missing 'regulators' subnode in DT\n"); return -EINVAL;