]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/videocodec.c
V4L/DVB (5170): Pvrusb2: Add boilerplate to new header file
[linux-2.6-omap-h63xx.git] / drivers / media / video / videocodec.c
index 839db622040dcdcfe1ff344d7f8846b5c9a7ef53..290e641356502fd8c87a95bc2649831d669c4b76 100644 (file)
@@ -36,7 +36,6 @@
 #include <linux/slab.h>
 
 // kernel config is here (procfs flag)
-#include <linux/config.h>
 
 #ifdef CONFIG_PROC_FS
 #include <linux/proc_fs.h>
@@ -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,