From patchwork Fri Feb 14 11:49:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 24629 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f72.google.com (mail-pb0-f72.google.com [209.85.160.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 50474202B2 for ; Fri, 14 Feb 2014 11:55:52 +0000 (UTC) Received: by mail-pb0-f72.google.com with SMTP id up15sf26314136pbc.11 for ; Fri, 14 Feb 2014 03:55:51 -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:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=3RL6oQSjFTRYbadpdMSnWZITOjqEFK1p+XOek7Rj02U=; b=aoTejh6aO+pDt0lwiW7RNAom0d56jknfJzSnGR2ClTnZs48wTJ9uTTVkX11YecHvte YLCAJ3RbbqlNFau0XtrF9tuKZcfUN7WZZL5XrstDSFeUZrspsGvx+yTJoGtok0itc1ME HRPpUGwVE+ZuVsFEcmx4ahq4t65AEF6EzHgpKLWTf6TMQhZqVvWp5T7y+Lp2HfgD+SXY is5YqqBSCZej7TOFn3bMMc3koMj0aOlUoiB7N9zGvxLQi7c4CvSH10tAzQKYpme8C4Oa MzX2rwZ61F/8iGMStPV2JI+4jKlulDOUZawszQMJoAoUnkt2SUWdGTXlH/F6jrPdTfof 8mxA== X-Gm-Message-State: ALoCoQnteNCd1uYKuHXXty2RlUKlwB2swj/e4Q3pqAH54VHaw47C+T79QzEBt4EOflaD0XLr+i2e X-Received: by 10.66.66.109 with SMTP id e13mr2839621pat.1.1392378951523; Fri, 14 Feb 2014 03:55:51 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.42.14 with SMTP id b14ls48838qga.47.gmail; Fri, 14 Feb 2014 03:55:51 -0800 (PST) X-Received: by 10.52.157.8 with SMTP id wi8mr530682vdb.46.1392378951362; Fri, 14 Feb 2014 03:55:51 -0800 (PST) Received: from mail-ve0-f172.google.com (mail-ve0-f172.google.com [209.85.128.172]) by mx.google.com with ESMTPS id kn3si1833571veb.54.2014.02.14.03.55.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Feb 2014 03:55:48 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.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.128.172; Received: by mail-ve0-f172.google.com with SMTP id c14so9574850vea.17 for ; Fri, 14 Feb 2014 03:55:48 -0800 (PST) X-Received: by 10.52.155.66 with SMTP id vu2mr505257vdb.50.1392378947968; Fri, 14 Feb 2014 03:55:47 -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 u4csp102832vcz; Fri, 14 Feb 2014 03:55:47 -0800 (PST) X-Received: by 10.66.228.37 with SMTP id sf5mr8530221pac.19.1392378946981; Fri, 14 Feb 2014 03:55:46 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id oq9si5526388pac.238.2014.02.14.03.55.46; Fri, 14 Feb 2014 03:55:46 -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 S1752424AbaBNLzl (ORCPT + 27 others); Fri, 14 Feb 2014 06:55:41 -0500 Received: from mail-pa0-f48.google.com ([209.85.220.48]:52822 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751065AbaBNLzj (ORCPT ); Fri, 14 Feb 2014 06:55:39 -0500 Received: by mail-pa0-f48.google.com with SMTP id kx10so12160575pab.7 for ; Fri, 14 Feb 2014 03:55:39 -0800 (PST) X-Received: by 10.68.212.10 with SMTP id ng10mr8551282pbc.95.1392378939558; Fri, 14 Feb 2014 03:55:39 -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.36 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Feb 2014 03:55:38 -0800 (PST) From: Sachin Kamat To: linux-kernel@vger.kernel.org Cc: broonie@kernel.org, lgirdwood@gmail.com, sachin.kamat@linaro.org Subject: [PATCH 01/16] regulator: max77686: Use of_get_child_by_name Date: Fri, 14 Feb 2014 17:19:47 +0530 Message-Id: <1392378602-32302-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 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.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 --- Series compile tested. Some max* regulators tested on h/w. --- drivers/regulator/max77686.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/max77686.c b/drivers/regulator/max77686.c index ae001ccf26f4..0e725f6ed455 100644 --- a/drivers/regulator/max77686.c +++ b/drivers/regulator/max77686.c @@ -400,7 +400,7 @@ static int max77686_pmic_dt_parse_pdata(struct platform_device *pdev, unsigned int i; pmic_np = iodev->dev->of_node; - regulators_np = of_find_node_by_name(pmic_np, "voltage-regulators"); + regulators_np = of_get_child_by_name(pmic_np, "voltage-regulators"); if (!regulators_np) { dev_err(&pdev->dev, "could not find regulators sub-node\n"); return -EINVAL;