From patchwork Mon Mar 10 09:57:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 25953 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f69.google.com (mail-qa0-f69.google.com [209.85.216.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C84622054B for ; Mon, 10 Mar 2014 10:03:55 +0000 (UTC) Received: by mail-qa0-f69.google.com with SMTP id w5sf16287552qac.4 for ; Mon, 10 Mar 2014 03:03:55 -0700 (PDT) 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=QuwDFe5SIodfdb7LZb5OEt4wf+7hi11fOXI7fLDt+viQ1pvjTzPxMsymtbHpFQ+PMs ZiSuXQ8I5G9+fhfKfi5bTyF9crLCbouoP6BomLC58+JxHezN6NvcHlXjtRGovUrJjzjA 7PIJ9L83OxrWhszrbp299fFxqzwuQ7Vy8UmKeqzbhjxChGWn3SrVaQnom12w+oShrcHF MwUHkeO7pFMUxeKA9rz0hfPPGuZGW28Vtad+cTEmh7lxTX4JwnwDqleH/N41eBMNx3Wq INy57oOokETI+tp/MuQUG58GfsR3Ay/htzD4QMDmT9Ptu1To2/VO/yRtrgV3Adxo+XhL wCeQ== X-Gm-Message-State: ALoCoQkv7cWSEZQMj0YBYDgS8lm0kV9802WrambPZ+qe/uXTKJ5fa7ijRHtJl3MkLKPfnS2OTUvf X-Received: by 10.236.134.205 with SMTP id s53mr1169536yhi.53.1394445835623; Mon, 10 Mar 2014 03:03:55 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.104.117 with SMTP id z108ls1978274qge.51.gmail; Mon, 10 Mar 2014 03:03:55 -0700 (PDT) X-Received: by 10.58.255.233 with SMTP id at9mr22690934ved.20.1394445835529; Mon, 10 Mar 2014 03:03:55 -0700 (PDT) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by mx.google.com with ESMTPS id qi7si4572589veb.34.2014.03.10.03.03.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Mar 2014 03:03:55 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.177 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.177; Received: by mail-vc0-f177.google.com with SMTP id if17so3915787vcb.36 for ; Mon, 10 Mar 2014 03:03:55 -0700 (PDT) X-Received: by 10.52.248.138 with SMTP id ym10mr22094807vdc.18.1394445835413; Mon, 10 Mar 2014 03:03:55 -0700 (PDT) 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.78.9 with SMTP id i9csp107519vck; Mon, 10 Mar 2014 03:03:54 -0700 (PDT) X-Received: by 10.66.156.4 with SMTP id wa4mr39467684pab.49.1394445834312; Mon, 10 Mar 2014 03:03:54 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e2si16285170pba.151.2014.03.10.03.03.53; Mon, 10 Mar 2014 03:03:53 -0700 (PDT) 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 S1753382AbaCJKDq (ORCPT + 26 others); Mon, 10 Mar 2014 06:03:46 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:40398 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752651AbaCJKDp (ORCPT ); Mon, 10 Mar 2014 06:03:45 -0400 Received: by mail-pa0-f44.google.com with SMTP id bj1so7099642pad.3 for ; Mon, 10 Mar 2014 03:03:44 -0700 (PDT) X-Received: by 10.66.139.100 with SMTP id qx4mr39020494pab.141.1394445824817; Mon, 10 Mar 2014 03:03:44 -0700 (PDT) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id pe3sm63495738pbc.23.2014.03.10.03.03.42 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Mar 2014 03:03:44 -0700 (PDT) From: Sachin Kamat To: linux-kernel@vger.kernel.org Cc: broonie@kernel.org, lgirdwood@gmail.com, sachin.kamat@linaro.org Subject: [PATCH Resend 1/2] regulator: s2mps11: Use of_get_child_by_name Date: Mon, 10 Mar 2014 15:27:40 +0530 Message-Id: <1394445461-17532-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.220.177 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;