X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fmedia%2Fvideo%2Fvideocodec.c;h=290e641356502fd8c87a95bc2649831d669c4b76;hb=edae96bd72155b88f8682c830c63338cd699d35c;hp=839db622040dcdcfe1ff344d7f8846b5c9a7ef53;hpb=7079060f3e86ea4c1d4e9c1e356592ef9dcaaa1f;p=linux-2.6-omap-h63xx.git diff --git a/drivers/media/video/videocodec.c b/drivers/media/video/videocodec.c index 839db622040..290e6413565 100644 --- a/drivers/media/video/videocodec.c +++ b/drivers/media/video/videocodec.c @@ -36,7 +36,6 @@ #include // kernel config is here (procfs flag) -#include #ifdef CONFIG_PROC_FS #include @@ -124,17 +123,13 @@ videocodec_attach (struct videocodec_master *master) if (res == 0) { dprintk(3, "videocodec_attach '%s'\n", codec->name); - ptr = (struct attached_list *) - kmalloc(sizeof(struct attached_list), - GFP_KERNEL); + ptr = kzalloc(sizeof(struct attached_list), GFP_KERNEL); if (!ptr) { dprintk(1, KERN_ERR "videocodec_attach: no memory\n"); goto out_kfree; } - memset(ptr, 0, - sizeof(struct attached_list)); ptr->codec = codec; a = h->list; @@ -249,14 +244,11 @@ videocodec_register (const struct videocodec *codec) "videocodec: register '%s', type: %x, flags %lx, magic %lx\n", codec->name, codec->type, codec->flags, codec->magic); - ptr = - (struct codec_list *) kmalloc(sizeof(struct codec_list), - GFP_KERNEL); + ptr = kzalloc(sizeof(struct codec_list), GFP_KERNEL); if (!ptr) { dprintk(1, KERN_ERR "videocodec_register: no memory\n"); return -ENOMEM; } - memset(ptr, 0, sizeof(struct codec_list)); ptr->codec = codec; if (!h) { @@ -354,7 +346,7 @@ videocodec_build_table (void) size); kfree(videocodec_buf); - videocodec_buf = (char *) kmalloc(size, GFP_KERNEL); + videocodec_buf = kmalloc(size, GFP_KERNEL); i = 0; i += scnprintf(videocodec_buf + i, size - 1,