From patchwork Wed Aug 8 21:00:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 1297501 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id A1F45DF223 for ; Wed, 8 Aug 2012 21:01:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759294Ab2HHVBn (ORCPT ); Wed, 8 Aug 2012 17:01:43 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:51816 "EHLO relay4-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759277Ab2HHVBn (ORCPT ); Wed, 8 Aug 2012 17:01:43 -0400 X-Originating-IP: 217.70.178.143 Received: from mfilter15-d.gandi.net (mfilter15-d.gandi.net [217.70.178.143]) by relay4-d.mail.gandi.net (Postfix) with ESMTP id 5DD60172093; Wed, 8 Aug 2012 23:01:41 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter15-d.gandi.net Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by mfilter15-d.gandi.net (mfilter15-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id WTomupfrHPrt; Wed, 8 Aug 2012 23:01:40 +0200 (CEST) X-Originating-IP: 83.160.107.163 Received: from d4rwin.no-ip.org (a83-160-107-163.adsl.xs4all.nl [83.160.107.163]) (Authenticated sender: matthias@kaehlcke.net) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 036DD172090; Wed, 8 Aug 2012 23:01:40 +0200 (CEST) Received: by d4rwin.no-ip.org (Postfix, from userid 1000) id AD706141F64; Wed, 8 Aug 2012 23:00:51 +0200 (CEST) Date: Wed, 8 Aug 2012 23:00:51 +0200 From: Matthias Kaehlcke To: "AnilKumar, Chimata" Cc: Samuel Ortiz , "linux-omap@vger.kernel.org" Subject: [PATCH] mfd: Fix allocation size of tps65217 platform data Message-ID: <20120808210051.GD30282@darwin> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org tps65217_parse_dt() allocates a struct tps65217_board for each regulator specified in the device tree. the structure itself provides arrays for the pointers to the regulator init data and the regulator device tree node, so only one instance of it is needed This patch is based on the mfd tree Signed-off-by: Matthias Kaehlcke --- drivers/mfd/tps65217.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/tps65217.c b/drivers/mfd/tps65217.c index 61c097a..cf908ac 100644 --- a/drivers/mfd/tps65217.c +++ b/drivers/mfd/tps65217.c @@ -162,7 +162,7 @@ static struct tps65217_board *tps65217_parse_dt(struct i2c_client *client) return NULL; count = ret; - pdata = devm_kzalloc(&client->dev, count * sizeof(*pdata), GFP_KERNEL); + pdata = devm_kzalloc(&client->dev, sizeof(*pdata), GFP_KERNEL); if (!pdata) return NULL;