linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mfd: Fix allocation size of tps65217 platform data
@ 2012-08-08 21:00 Matthias Kaehlcke
  2012-08-13  6:54 ` AnilKumar, Chimata
  0 siblings, 1 reply; 2+ messages in thread
From: Matthias Kaehlcke @ 2012-08-08 21:00 UTC (permalink / raw)
  To: AnilKumar, Chimata; +Cc: Samuel Ortiz, 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 <matthias@kaehlcke.net>
---
 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;
 
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: [PATCH] mfd: Fix allocation size of tps65217 platform data
  2012-08-08 21:00 [PATCH] mfd: Fix allocation size of tps65217 platform data Matthias Kaehlcke
@ 2012-08-13  6:54 ` AnilKumar, Chimata
  0 siblings, 0 replies; 2+ messages in thread
From: AnilKumar, Chimata @ 2012-08-13  6:54 UTC (permalink / raw)
  To: Matthias Kaehlcke; +Cc: Samuel Ortiz, linux-omap@vger.kernel.org

Hi Matthias,

Can you comment on my latest patch? So that I can fix this issue
on the same.

https://patchwork.kernel.org/patch/1220151/

Thanks
AnilKumar

On Thu, Aug 09, 2012 at 02:30:51, Matthias Kaehlcke wrote:
> 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 <matthias@kaehlcke.net>
> ---
>  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;
>  
> -- 
> 1.7.10
> 
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-08-13  6:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-08 21:00 [PATCH] mfd: Fix allocation size of tps65217 platform data Matthias Kaehlcke
2012-08-13  6:54 ` AnilKumar, Chimata

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).