X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fmedia%2Fvideo%2Fzr36016.c;h=62f77584fb859acb30b4dcac559dc07476b1f456;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=d4740a89cea1c21fd3375969816af9c1f4e8f170;hpb=cee37fe97739d85991964371c1f3a745c00dd236;p=linux-2.6.git diff --git a/drivers/media/video/zr36016.c b/drivers/media/video/zr36016.c index d4740a89c..62f77584f 100644 --- a/drivers/media/video/zr36016.c +++ b/drivers/media/video/zr36016.c @@ -26,7 +26,6 @@ #define ZR016_VERSION "v0.7" -#include #include #include #include @@ -35,7 +34,7 @@ #include #include -/* includes for structures and defines regarding video +/* includes for structures and defines regarding video #include */ /* I/O commands, error codes */ @@ -144,8 +143,8 @@ zr36016_readi (struct zr36016 *ptr, static void zr36016_writei (struct zr36016 *ptr, - u16 reg, - u8 value) + u16 reg, + u8 value) { dprintk(4, "%s: writing indirect 0x%02x to 0x%04x\n", ptr->name, value, reg); @@ -193,7 +192,7 @@ zr36016_basic_test (struct zr36016 *ptr) dprintk(1, "\n"); } // for testing just write 0, then the default value to a register and read - // it back in both cases + // it back in both cases zr36016_writei(ptr, ZR016I_PAX_LO, 0x00); if (zr36016_readi(ptr, ZR016I_PAX_LO) != 0x0) { dprintk(1, @@ -233,17 +232,17 @@ zr36016_basic_test (struct zr36016 *ptr) static int zr36016_pushit (struct zr36016 *ptr, u16 startreg, u16 len, - const char *data) + const char *data) { - int i=0; + int i=0; - dprintk(4, "%s: write data block to 0x%04x (len=%d)\n", + dprintk(4, "%s: write data block to 0x%04x (len=%d)\n", ptr->name, startreg,len); - while (idata = ptr = kmalloc(sizeof(struct zr36016), GFP_KERNEL); + codec->data = ptr = kzalloc(sizeof(struct zr36016), GFP_KERNEL); if (NULL == ptr) { dprintk(1, KERN_ERR "zr36016: Can't get enough memory!\n"); return -ENOMEM; } - memset(ptr, 0, sizeof(struct zr36016)); snprintf(ptr->name, sizeof(ptr->name), "zr36016[%d]", zr36016_codecs);