diff options
author | Panagiotis Issaris <takis@issaris.org> | 2006-01-11 21:40:56 (GMT) |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@brturbo.com.br> | 2006-01-11 21:40:56 (GMT) |
commit | 7408187d223f63d46a13b6a35b8f96b032c2f623 (patch) | |
tree | 425a459f760295de488f57e3f97b034aaa76a78d /drivers/media/video/ovcamchip | |
parent | 0b3af1b6df82cfdb54ae294ed860263011fa0408 (diff) | |
download | linux-7408187d223f63d46a13b6a35b8f96b032c2f623.tar.xz |
V4L/DVB (3344a): Conversions from kmalloc+memset to k(z|c)alloc
Conversions from kmalloc+memset to k(z|c)alloc.
Signed-off-by: Panagiotis Issaris <takis@issaris.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/ovcamchip')
-rw-r--r-- | drivers/media/video/ovcamchip/ov6x20.c | 3 | ||||
-rw-r--r-- | drivers/media/video/ovcamchip/ov6x30.c | 3 | ||||
-rw-r--r-- | drivers/media/video/ovcamchip/ov76be.c | 3 | ||||
-rw-r--r-- | drivers/media/video/ovcamchip/ov7x10.c | 3 | ||||
-rw-r--r-- | drivers/media/video/ovcamchip/ov7x20.c | 3 | ||||
-rw-r--r-- | drivers/media/video/ovcamchip/ovcamchip_core.c | 3 |
6 files changed, 6 insertions, 12 deletions
diff --git a/drivers/media/video/ovcamchip/ov6x20.c b/drivers/media/video/ovcamchip/ov6x20.c index b3f4d26..c04130d 100644 --- a/drivers/media/video/ovcamchip/ov6x20.c +++ b/drivers/media/video/ovcamchip/ov6x20.c @@ -178,10 +178,9 @@ static int ov6x20_init(struct i2c_client *c) if (rc < 0) return rc; - ov->spriv = s = kmalloc(sizeof *s, GFP_KERNEL); + ov->spriv = s = kzalloc(sizeof *s, GFP_KERNEL); if (!s) return -ENOMEM; - memset(s, 0, sizeof *s); s->auto_brt = 1; s->auto_exp = 1; diff --git a/drivers/media/video/ovcamchip/ov6x30.c b/drivers/media/video/ovcamchip/ov6x30.c index 6eab458..73b94f5 100644 --- a/drivers/media/video/ovcamchip/ov6x30.c +++ b/drivers/media/video/ovcamchip/ov6x30.c @@ -141,10 +141,9 @@ static int ov6x30_init(struct i2c_client *c) if (rc < 0) return rc; - ov->spriv = s = kmalloc(sizeof *s, GFP_KERNEL); + ov->spriv = s = kzalloc(sizeof *s, GFP_KERNEL); if (!s) return -ENOMEM; - memset(s, 0, sizeof *s); s->auto_brt = 1; s->auto_exp = 1; diff --git a/drivers/media/video/ovcamchip/ov76be.c b/drivers/media/video/ovcamchip/ov76be.c index 29bbdc0..11f6be9 100644 --- a/drivers/media/video/ovcamchip/ov76be.c +++ b/drivers/media/video/ovcamchip/ov76be.c @@ -105,10 +105,9 @@ static int ov76be_init(struct i2c_client *c) if (rc < 0) return rc; - ov->spriv = s = kmalloc(sizeof *s, GFP_KERNEL); + ov->spriv = s = kzalloc(sizeof *s, GFP_KERNEL); if (!s) return -ENOMEM; - memset(s, 0, sizeof *s); s->auto_brt = 1; s->auto_exp = 1; diff --git a/drivers/media/video/ovcamchip/ov7x10.c b/drivers/media/video/ovcamchip/ov7x10.c index 6c383d4..5206e79 100644 --- a/drivers/media/video/ovcamchip/ov7x10.c +++ b/drivers/media/video/ovcamchip/ov7x10.c @@ -115,10 +115,9 @@ static int ov7x10_init(struct i2c_client *c) if (rc < 0) return rc; - ov->spriv = s = kmalloc(sizeof *s, GFP_KERNEL); + ov->spriv = s = kzalloc(sizeof *s, GFP_KERNEL); if (!s) return -ENOMEM; - memset(s, 0, sizeof *s); s->auto_brt = 1; s->auto_exp = 1; diff --git a/drivers/media/video/ovcamchip/ov7x20.c b/drivers/media/video/ovcamchip/ov7x20.c index 3c8c48f..8e26ae3 100644 --- a/drivers/media/video/ovcamchip/ov7x20.c +++ b/drivers/media/video/ovcamchip/ov7x20.c @@ -232,10 +232,9 @@ static int ov7x20_init(struct i2c_client *c) if (rc < 0) return rc; - ov->spriv = s = kmalloc(sizeof *s, GFP_KERNEL); + ov->spriv = s = kzalloc(sizeof *s, GFP_KERNEL); if (!s) return -ENOMEM; - memset(s, 0, sizeof *s); s->auto_brt = 1; s->auto_exp = DFL_AUTO_EXP; diff --git a/drivers/media/video/ovcamchip/ovcamchip_core.c b/drivers/media/video/ovcamchip/ovcamchip_core.c index 428f1bb..e76b53d 100644 --- a/drivers/media/video/ovcamchip/ovcamchip_core.c +++ b/drivers/media/video/ovcamchip/ovcamchip_core.c @@ -316,12 +316,11 @@ static int ovcamchip_attach(struct i2c_adapter *adap) c->adapter = adap; strcpy(c->name, "OV????"); - ov = kmalloc(sizeof *ov, GFP_KERNEL); + ov = kzalloc(sizeof *ov, GFP_KERNEL); if (!ov) { rc = -ENOMEM; goto no_ov; } - memset(ov, 0, sizeof *ov); i2c_set_clientdata(c, ov); rc = ovcamchip_detect(c); |