From patchwork Tue Mar 4 05:46:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 25651 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f197.google.com (mail-qc0-f197.google.com [209.85.216.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 06E4A20540 for ; Tue, 4 Mar 2014 05:52:59 +0000 (UTC) Received: by mail-qc0-f197.google.com with SMTP id i8sf12492113qcq.8 for ; Mon, 03 Mar 2014 21:52:59 -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=NXxUtcO9uSRlH+vCkIpzFFHespiOBh6N7cBVFocJEtA=; b=Wn83uaapNvwOLDUI+4mLXWiw2OObJud96sSJ6UH3Fei7e57VN/Fmw7cPvuC4BQXGXr HlJ+o0hi86DzFgopwSs4NPK6YLBjAmbQ0MkAvrfrbiJgGAeBtgbUXm0L5qU5oMwzTZZ9 2dLU3DGRXDsHLIHU6JnKzlxtqTNywnjCe6+jDNhCzU6XZrQEJx6lXvErKmsTzkOlJAjC ozeeN9Mk5WaXUz4FbMI9Je5J75TmWqswiOj0wdaKKTn1vePDf9dQof9Lb6FGiNHPdmm7 6oFQa4VphTsDJ77uHtIIdm5/XhqFRka3ApYM99YOc2D6Eb4fr3FemT/QppRywEh02aMp oI1w== X-Gm-Message-State: ALoCoQnyWJ7pOGSek/6kv7YX6l3Q7fpHY0p5TOLCxdUs2Y90Tj99uRNbaQ9KLuNAi7TL1GXhv12w X-Received: by 10.236.175.66 with SMTP id y42mr9359963yhl.38.1393912379496; Mon, 03 Mar 2014 21:52:59 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.86.233 with SMTP id p96ls2342525qgd.33.gmail; Mon, 03 Mar 2014 21:52:59 -0800 (PST) X-Received: by 10.58.106.134 with SMTP id gu6mr87751veb.44.1393912379416; Mon, 03 Mar 2014 21:52:59 -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 el6si5506749vcb.89.2014.03.03.21.52.59 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 03 Mar 2014 21:52:59 -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 cz12so5097007veb.30 for ; Mon, 03 Mar 2014 21:52:59 -0800 (PST) X-Received: by 10.52.250.198 with SMTP id ze6mr68323vdc.55.1393912379314; Mon, 03 Mar 2014 21:52:59 -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.130.193 with SMTP id u1csp104098vcs; Mon, 3 Mar 2014 21:52:58 -0800 (PST) X-Received: by 10.68.132.130 with SMTP id ou2mr1439513pbb.107.1393912378271; Mon, 03 Mar 2014 21:52:58 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id uc9si12908437pac.326.2014.03.03.21.52.57; Mon, 03 Mar 2014 21:52:57 -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 S1756095AbaCDFwv (ORCPT + 26 others); Tue, 4 Mar 2014 00:52:51 -0500 Received: from mail-pb0-f41.google.com ([209.85.160.41]:45124 "EHLO mail-pb0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751414AbaCDFwt (ORCPT ); Tue, 4 Mar 2014 00:52:49 -0500 Received: by mail-pb0-f41.google.com with SMTP id jt11so4763018pbb.14 for ; Mon, 03 Mar 2014 21:52:49 -0800 (PST) X-Received: by 10.66.180.200 with SMTP id dq8mr3973200pac.104.1393912369461; Mon, 03 Mar 2014 21:52:49 -0800 (PST) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id iv2sm21646480pbc.19.2014.03.03.21.52.46 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 03 Mar 2014 21:52:48 -0800 (PST) From: Sachin Kamat To: linux-kernel@vger.kernel.org Cc: broonie@kernel.org, lgirdwood@gmail.com, sbkim73@samsung.com, sachin.kamat@linaro.org Subject: [PATCH 1/2] regulator: s2mps11: Use of_get_child_by_name Date: Tue, 4 Mar 2014 11:16:57 +0530 Message-Id: <1393912018-15780-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.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/s2mps11.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c index b51ccf5..0f6177b 100644 --- a/drivers/regulator/s2mps11.c +++ b/drivers/regulator/s2mps11.c @@ -438,7 +438,7 @@ static int s2mps11_pmic_probe(struct platform_device *pdev) for (i = 0; i < s2mps11->rdev_num; i++) rdata[i].name = regulators[i].name; - reg_np = of_find_node_by_name(iodev->dev->of_node, "regulators"); + reg_np = of_get_child_by_name(iodev->dev->of_node, "regulators"); if (!reg_np) { dev_err(&pdev->dev, "could not find regulators sub-node\n"); ret = -EINVAL;