From patchwork Fri Feb 14 11:49:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 24643 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f69.google.com (mail-pa0-f69.google.com [209.85.220.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2F5DD202B2 for ; Fri, 14 Feb 2014 11:59:22 +0000 (UTC) Received: by mail-pa0-f69.google.com with SMTP id fa1sf27537038pad.0 for ; Fri, 14 Feb 2014 03:59:21 -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=FiqZsN2C9FZP+d3bkjaiaVePxoZ99QKXQgMreMhxdgs=; b=X4SlVLevUK7Eel3tphsB4hRL+VbZEJwAUSC2zp0jltfW/6avs/hobLVBgGPg7sT7iQ 8UOAO0nKNunsXwjRI730WJUznahPmfpLbs0y0xiLpJHTadsdch+3V7ON9Is70ZCnSnHD tm2ivAiF4I6OFzRAFZUaLgDSXXZuTYrKhe/XdzKrH4UtXNqkrpdMR1D2fI3tj/OLI4RP W+7JJpDxqKOaSDzZPX7JfykNdaIDmY64aYJ3OOhdv7D0nVAJdLGSC/Hv9/konP4yIJVw dJjpGIAc6HkSA99SHFfnBoLZMP/CXRtqA0o+TjfaEibv4gVL08d2KVOAFFx29QEYumK/ xbtA== X-Gm-Message-State: ALoCoQln9k53W4K0ObOpuaIQszTxYkz+aPwzW0M2BnwEByclmi+ACmiYFrUQOxsgv5fXVEFAzXW/ X-Received: by 10.66.65.202 with SMTP id z10mr1917479pas.45.1392379161403; Fri, 14 Feb 2014 03:59:21 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.43.201 with SMTP id e67ls49279qga.32.gmail; Fri, 14 Feb 2014 03:59:21 -0800 (PST) X-Received: by 10.52.227.193 with SMTP id sc1mr4264401vdc.1.1392379161260; Fri, 14 Feb 2014 03:59:21 -0800 (PST) Received: from mail-ve0-f181.google.com (mail-ve0-f181.google.com [209.85.128.181]) by mx.google.com with ESMTPS id kl10si1821501vdb.116.2014.02.14.03.59.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Feb 2014 03:59:21 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.181 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.181; Received: by mail-ve0-f181.google.com with SMTP id cz12so9492287veb.40 for ; Fri, 14 Feb 2014 03:59:21 -0800 (PST) X-Received: by 10.53.13.44 with SMTP id ev12mr4332124vdd.17.1392379161093; Fri, 14 Feb 2014 03:59:21 -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 u4csp103019vcz; Fri, 14 Feb 2014 03:59:20 -0800 (PST) X-Received: by 10.68.228.138 with SMTP id si10mr8615078pbc.13.1392379160434; Fri, 14 Feb 2014 03:59:20 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r3si5578338pbh.40.2014.02.14.03.59.19; Fri, 14 Feb 2014 03:59:19 -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 S1752526AbaBNLzs (ORCPT + 27 others); Fri, 14 Feb 2014 06:55:48 -0500 Received: from mail-pa0-f52.google.com ([209.85.220.52]:57322 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752482AbaBNLzp (ORCPT ); Fri, 14 Feb 2014 06:55:45 -0500 Received: by mail-pa0-f52.google.com with SMTP id bj1so12194438pad.11 for ; Fri, 14 Feb 2014 03:55:45 -0800 (PST) X-Received: by 10.66.232.40 with SMTP id tl8mr8542658pac.137.1392378945213; Fri, 14 Feb 2014 03:55:45 -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.42 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Feb 2014 03:55:44 -0800 (PST) From: Sachin Kamat To: linux-kernel@vger.kernel.org Cc: broonie@kernel.org, lgirdwood@gmail.com, sachin.kamat@linaro.org Subject: [PATCH 03/16] regulator: max8660: Use of_get_child_by_name Date: Fri, 14 Feb 2014 17:19:49 +0530 Message-Id: <1392378602-32302-3-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.181 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/max8660.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/max8660.c b/drivers/regulator/max8660.c index 8d94d3d7f97f..70351abbd1e9 100644 --- a/drivers/regulator/max8660.c +++ b/drivers/regulator/max8660.c @@ -330,7 +330,7 @@ static int max8660_pdata_from_dt(struct device *dev, struct max8660_subdev_data *sub; struct of_regulator_match rmatch[ARRAY_SIZE(max8660_reg)]; - 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;