From patchwork Sun Jun 22 15:31:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Beniamino Galvani X-Patchwork-Id: 4396181 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 2AE999F26E for ; Sun, 22 Jun 2014 15:37:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 58E122022A for ; Sun, 22 Jun 2014 15:37:38 +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 8CD6B2021B for ; Sun, 22 Jun 2014 15:37:37 +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 1WyjmG-0005sS-4O; Sun, 22 Jun 2014 15:33:56 +0000 Received: from mail-wg0-x22b.google.com ([2a00:1450:400c:c00::22b]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wyjm7-0005nw-P0 for linux-arm-kernel@lists.infradead.org; Sun, 22 Jun 2014 15:33:48 +0000 Received: by mail-wg0-f43.google.com with SMTP id b13so5689903wgh.14 for ; Sun, 22 Jun 2014 08:33:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=kylhj7HRbFZ/MXt8riLq4uNxjzdr6KUDabiqVj6VSP8=; b=LxtvOE+4xPrOGEEluJYWr7FAMpkkoiNeQ5OAWo3U99tYWdKN/Jx8xMCbeO+Uof3pcP Km61cx/xWFHOT6jgpc6qJ0pqaSr05tvgpsGz4upAc6UDf0hyR+4YrxKxKeamlXFwvmd/ HD63iTZjtlV4zDQXeu6jXjGUGMqTOOetJZPRIOh1MVKosNfDcWNdaB+P+ExS+d14YwaS vO6ng/P1LeN7r3iV5z95ojF1YUlgEaGtiJwfhLcnAFEgIMPfA3H4IS/F8PP3OUwB4c9d ZXs9b/EXk1ExVU5w2ZQCEZ2kLIRFRBQ0b9ttlCZLZHAe9KW0+GONEqcDBzmkTF1HApCX JPSg== X-Received: by 10.180.218.4 with SMTP id pc4mr19090773wic.21.1403451203315; Sun, 22 Jun 2014 08:33:23 -0700 (PDT) Received: from sark.local (host188-27-dynamic.31-79-r.retail.telecomitalia.it. [79.31.27.188]) by mx.google.com with ESMTPSA id ex4sm24500007wic.2.2014.06.22.08.33.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 Jun 2014 08:33:22 -0700 (PDT) From: Beniamino Galvani To: Liam Girdwood , Mark Brown Subject: [PATCH 2/5] regulator: act8865: set correct number of regulators in pdata Date: Sun, 22 Jun 2014 17:31:42 +0200 Message-Id: <1403451105-31929-3-git-send-email-b.galvani@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1403451105-31929-1-git-send-email-b.galvani@gmail.com> References: <1403451105-31929-1-git-send-email-b.galvani@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140622_083348_048850_0FB91198 X-CRM114-Status: GOOD ( 11.69 ) X-Spam-Score: -0.8 (/) Cc: Mark Rutland , devicetree@vger.kernel.org, Heiko Stuebner , Pawel Moll , Ian Campbell , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Wenyou Yang , Beniamino Galvani , Rob Herring , Kumar Gala , linux-arm-kernel@lists.infradead.org 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=-1.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=no 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 When platform data is populated from DT all the regulators are instantiated and the value of num_regulators should be the number of all available regulators rather than the number of matched ones. Signed-off-by: Beniamino Galvani --- drivers/regulator/act8865-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/act8865-regulator.c b/drivers/regulator/act8865-regulator.c index fe2c038..b03a0e8 100644 --- a/drivers/regulator/act8865-regulator.c +++ b/drivers/regulator/act8865-regulator.c @@ -230,7 +230,7 @@ static int act8865_pdata_from_dt(struct device *dev, if (!pdata->regulators) return -ENOMEM; - pdata->num_regulators = matched; + pdata->num_regulators = ARRAY_SIZE(act8865_matches); regulator = pdata->regulators; for (i = 0; i < ARRAY_SIZE(act8865_matches); i++) {