linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / drivers / media / video / zr36050.c
index 1e1bec6..6699725 100644 (file)
@@ -26,7 +26,6 @@
 
 #define ZR050_VERSION "v0.7.1"
 
-#include <linux/version.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/slab.h>
@@ -160,7 +159,7 @@ zr36050_wait_end (struct zr36050 *ptr)
 
        while (!(zr36050_read_status1(ptr) & 0x4)) {
                udelay(1);
-               if (i++ > 200000) {     // 200ms, there is for shure something wrong!!!
+               if (i++ > 200000) {     // 200ms, there is for sure something wrong!!!
                        dprintk(1,
                                "%s: timout at wait_end (last status: 0x%02x)\n",
                                ptr->name, ptr->status1);
@@ -419,7 +418,7 @@ zr36050_set_dri (struct zr36050 *ptr)
        dri_data[2] = 0x00;
        dri_data[3] = 0x04;
        dri_data[4] = ptr->dri >> 8;
-       dri_data[5] = ptr->dri * 0xff;
+       dri_data[5] = ptr->dri & 0xff;
        return zr36050_pushit(ptr, ZR050_DRI_IDX, 6, dri_data);
 }
 
@@ -814,12 +813,11 @@ zr36050_setup (struct videocodec *codec)
                return -ENOSPC;
        }
        //mem structure init
-       codec->data = ptr = kmalloc(sizeof(struct zr36050), GFP_KERNEL);
+       codec->data = ptr = kzalloc(sizeof(struct zr36050), GFP_KERNEL);
        if (NULL == ptr) {
                dprintk(1, KERN_ERR "zr36050: Can't get enough memory!\n");
                return -ENOMEM;
        }
-       memset(ptr, 0, sizeof(struct zr36050));
 
        snprintf(ptr->name, sizeof(ptr->name), "zr36050[%d]",
                 zr36050_codecs);