From patchwork Tue Sep 9 11:07:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guodong Xu X-Patchwork-Id: 4868551 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4461A9F32E for ; Tue, 9 Sep 2014 11:10:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1C72E200DB for ; Tue, 9 Sep 2014 11:10:37 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A0820200EC for ; Tue, 9 Sep 2014 11:10:35 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XRJHi-0008Hp-Pn; Tue, 09 Sep 2014 11:08:30 +0000 Received: from mail-pd0-f177.google.com ([209.85.192.177]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XRJHg-0008Bu-6D for linux-arm-kernel@lists.infradead.org; Tue, 09 Sep 2014 11:08:28 +0000 Received: by mail-pd0-f177.google.com with SMTP id y10so1014239pdj.36 for ; Tue, 09 Sep 2014 04:08:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=wDCwvF7LkQLfOtXr+G7Ch6hOjhHCCPVXQ+5e6W2ooaw=; b=mxfGYZ6XX26byNcSliOGBe5FLQlQiuwdJvxik0xvcvBHRZIGIFD0hDqEowRxaD97dW 63LGworNv2ogaEEwNsTC/eXLTLPDP+oAHWTLLqQUKWbzltwaXHYAPhrFC0ZZm1lmC7hg ay8X5NRBp4bZa38r1937thXTosxLBbafgpUgGyzCnMut0AMUGJJFQktgZKvMhPpBhtKL Ch3AXaOJ9a/CUjjv9R3KPZp4h0t/d2fIsaxFwF8/+5trDr9bIht8VLGmYoUGhbnw6AaK 75Nf4WNS+tWG+L3pHr/Ue0klZL2i0cd1tLXx0WNmR8PCs46+k6tmz9cattMpcKMBDRWt AirQ== X-Gm-Message-State: ALoCoQkjyDsNcYGm7uiuN2msHQPQ0hqpztaxbL+ag1XSbEVF4cICpg/1GOZbo73p0fBDIH3JOJpV X-Received: by 10.70.36.239 with SMTP id t15mr56254981pdj.83.1410260886278; Tue, 09 Sep 2014 04:08:06 -0700 (PDT) Received: from localhost.localdomain ([125.39.9.137]) by mx.google.com with ESMTPSA id k11sm8410959pbq.64.2014.09.09.04.08.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 Sep 2014 04:08:05 -0700 (PDT) From: Guodong Xu To: broonie@kernel.org, lgirdwood@gmail.com, shawn.guo@linaro.org, axel.lin@ingics.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH] regulator: mc13xxx: add missing of_node_get() Date: Tue, 9 Sep 2014 19:07:05 +0800 Message-Id: <1410260825-21667-1-git-send-email-guodong.xu@linaro.org> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140909_040828_254142_15578A38 X-CRM114-Status: UNSURE ( 9.37 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.5 (--) Cc: Guodong Xu X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP mc13xxx_parse_regulators_dt() goes through dt tree to search for regulator sub-nodes. For each matched node, later on it will be used and registered into a regulator_dev. of_node_get() should be called to increase its refcount. Signed-off-by: Guodong Xu --- drivers/regulator/mc13xxx-regulator-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/mc13xxx-regulator-core.c b/drivers/regulator/mc13xxx-regulator-core.c index afba024..ebc8ff1 100644 --- a/drivers/regulator/mc13xxx-regulator-core.c +++ b/drivers/regulator/mc13xxx-regulator-core.c @@ -195,7 +195,7 @@ struct mc13xxx_regulator_init_data *mc13xxx_parse_regulators_dt( p->id = i; p->init_data = of_get_regulator_init_data( &pdev->dev, child); - p->node = child; + p->node = of_node_get(child); p++; parsed++;