From patchwork Fri Feb 14 11:49:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 24632 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f200.google.com (mail-ie0-f200.google.com [209.85.223.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 545B120448 for ; Fri, 14 Feb 2014 11:56:29 +0000 (UTC) Received: by mail-ie0-f200.google.com with SMTP id tp5sf41434329ieb.11 for ; Fri, 14 Feb 2014 03:56: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=+1EqKu3UYzOxTLA5Ha4xXWAD1mEBOtExghaGVTx9hXs=; b=EOkfiLIOw6vVUC7NyTMhziW7UYH5TsljhkUSua8DuOYgjJmPAepHU56N5If1/IM8jz ADwJt1lewdPdWZVTaDW0WBwE2+UXsnH4xFQWDGrNn0m7hwoIEmMJfLGScfOnjWbickIr g7MxyocNOyAE5G9WExfHUG9BJKTbfThqFqZn8CVBP8LotG7BlJxmCx+Palcu+JWrLVtO efok8iJDnv7EZURtd4k0DFGxMl0jZ/Pot4ywyM9gPkUreP97SxYSfeN3In9fAwmp4X4i mpxhIOs7XxpseR/mYKsooZCXiyEr0CRBD31zZ+/3CUNJBuqtew1HOk9fxzrQ09XiZeJy lCzw== X-Gm-Message-State: ALoCoQn/8FBhBswRi0Ss7gazYIaSaSQS4Pv8u79bxHcdJ11dLNM+1stXbJ3T09PCDPNYcURDrKXq X-Received: by 10.42.53.135 with SMTP id n7mr2652091icg.11.1392378988527; Fri, 14 Feb 2014 03:56:28 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.26.40 with SMTP id 37ls46723qgu.46.gmail; Fri, 14 Feb 2014 03:56:28 -0800 (PST) X-Received: by 10.221.30.14 with SMTP id sa14mr422386vcb.44.1392378988376; Fri, 14 Feb 2014 03:56:28 -0800 (PST) Received: from mail-ve0-f171.google.com (mail-ve0-f171.google.com [209.85.128.171]) by mx.google.com with ESMTPS id tt2si1820134vdc.113.2014.02.14.03.56.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Feb 2014 03:56:28 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.171 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.171; Received: by mail-ve0-f171.google.com with SMTP id pa12so9624442veb.16 for ; Fri, 14 Feb 2014 03:56:26 -0800 (PST) X-Received: by 10.52.94.77 with SMTP id da13mr327736vdb.55.1392378986004; Fri, 14 Feb 2014 03:56:26 -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 u4csp102858vcz; Fri, 14 Feb 2014 03:56:25 -0800 (PST) X-Received: by 10.68.183.228 with SMTP id ep4mr8416820pbc.67.1392378985047; Fri, 14 Feb 2014 03:56:25 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id of8si5551644pbc.163.2014.02.14.03.56.24; Fri, 14 Feb 2014 03:56:24 -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 S1752641AbaBNLz4 (ORCPT + 27 others); Fri, 14 Feb 2014 06:55:56 -0500 Received: from mail-pb0-f51.google.com ([209.85.160.51]:57542 "EHLO mail-pb0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752482AbaBNLzy (ORCPT ); Fri, 14 Feb 2014 06:55:54 -0500 Received: by mail-pb0-f51.google.com with SMTP id un15so12234321pbc.38 for ; Fri, 14 Feb 2014 03:55:53 -0800 (PST) X-Received: by 10.67.5.233 with SMTP id cp9mr8349120pad.147.1392378953490; Fri, 14 Feb 2014 03:55:53 -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.50 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Feb 2014 03:55:52 -0800 (PST) From: Sachin Kamat To: linux-kernel@vger.kernel.org Cc: broonie@kernel.org, lgirdwood@gmail.com, sachin.kamat@linaro.org Subject: [PATCH 06/16] regulator: max8997: Use of_get_child_by_name Date: Fri, 14 Feb 2014 17:19:52 +0530 Message-Id: <1392378602-32302-6-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.171 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/max8997.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/max8997.c b/drivers/regulator/max8997.c index 2d618fc9c1af..10108f2941e3 100644 --- a/drivers/regulator/max8997.c +++ b/drivers/regulator/max8997.c @@ -924,7 +924,7 @@ static int max8997_pmic_dt_parse_pdata(struct platform_device *pdev, return -ENODEV; } - regulators_np = of_find_node_by_name(pmic_np, "regulators"); + regulators_np = of_get_child_by_name(pmic_np, "regulators"); if (!regulators_np) { dev_err(&pdev->dev, "could not find regulators sub-node\n"); return -EINVAL;