[PATCH 2/2] staging: media: cxd2099: use kzalloc to allocate ci pointer of type struct cxd in cxd2099_attach

2012-08-04 Thread Devendra Naga
this does kmalloc and followed by memset, calling kzalloc will actually sets the allocated memory to zero, use kzalloc instead Signed-off-by: Devendra Naga --- drivers/staging/media/cxd2099/cxd2099.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/media/c

Re: [PATCH 2/2] staging: media: cxd2099: use kzalloc to allocate ci pointer of type struct cxd in cxd2099_attach

2012-08-04 Thread Ezequiel Garcia
Hi Devendra, On Sat, Aug 4, 2012 at 3:12 PM, Devendra Naga wrote: > > mutex_init(&ci->lock); > memcpy(&ci->cfg, cfg, sizeof(struct cxd2099_cfg)); While you're still looking at this driver, perhaps you can change the memcpy with a plain struct assignment (if you feel like). It's r

Re: [PATCH 2/2] staging: media: cxd2099: use kzalloc to allocate ci pointer of type struct cxd in cxd2099_attach

2012-08-04 Thread Devendra Naga
Hello Ezequiel, On Sun, Aug 5, 2012 at 12:24 AM, Ezequiel Garcia wrote: > Hi Devendra, > > On Sat, Aug 4, 2012 at 3:12 PM, Devendra Naga > wrote: >> >> mutex_init(&ci->lock); >> memcpy(&ci->cfg, cfg, sizeof(struct cxd2099_cfg)); > > While you're still looking at this driver, perh

Re: [PATCH 2/2] staging: media: cxd2099: use kzalloc to allocate ci pointer of type struct cxd in cxd2099_attach

2012-08-05 Thread Ezequiel Garcia
Hi Devendra, On Sun, Aug 5, 2012 at 1:04 AM, Devendra Naga wrote: > Hello Ezequiel, > > On Sun, Aug 5, 2012 at 12:24 AM, Ezequiel Garcia > wrote: >> Hi Devendra, >> >> On Sat, Aug 4, 2012 at 3:12 PM, Devendra Naga >> wrote: >>> >>> mutex_init(&ci->lock); >>> memcpy(&ci->cfg, cf

Re: [PATCH 2/2] staging: media: cxd2099: use kzalloc to allocate ci pointer of type struct cxd in cxd2099_attach

2012-08-05 Thread Devendra Naga
Hello Ezequiel, Thanks, you wrote a full description of what i need to do.. i will definitely follow this. On Sun, Aug 5, 2012 at 11:57 PM, Ezequiel Garcia wrote: > Hi Devendra, > > On Sun, Aug 5, 2012 at 1:04 AM, Devendra Naga > wrote: >> Hello Ezequiel, >> >> On Sun, Aug 5, 2012 at 12:24 AM,