X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fmedia%2Fvideo%2Fzr36050.c;fp=drivers%2Fmedia%2Fvideo%2Fzr36050.c;h=a6bbd125631c06311c06be7bf175a9a73d8ec9a6;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=13b1e7b6fd6eb656bb1a7256d0b0dfe529b55ff6;hpb=cee37fe97739d85991964371c1f3a745c00dd236;p=linux-2.6.git diff --git a/drivers/media/video/zr36050.c b/drivers/media/video/zr36050.c index 13b1e7b6f..a6bbd1256 100644 --- a/drivers/media/video/zr36050.c +++ b/drivers/media/video/zr36050.c @@ -26,7 +26,6 @@ #define ZR050_VERSION "v0.7.1" -#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 */ @@ -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); @@ -172,7 +171,7 @@ zr36050_wait_end (struct zr36050 *ptr) /* ========================================================================= Local helper function: - basic test of "connectivity", writes/reads to/from memory the SOF marker + basic test of "connectivity", writes/reads to/from memory the SOF marker ========================================================================= */ static int @@ -219,9 +218,9 @@ zr36050_basic_test (struct zr36050 *ptr) static int zr36050_pushit (struct zr36050 *ptr, - u16 startreg, - u16 len, - const char *data) + u16 startreg, + u16 len, + const char *data) { int i = 0; @@ -346,7 +345,7 @@ static const char zr36050_decimation_v[8] = { 1, 1, 1, 0, 0, 0, 0, 0 }; /* ------------------------------------------------------------------------- */ /* SOF (start of frame) segment depends on width, height and sampling ratio - of each color component */ + of each color component */ static int zr36050_set_sof (struct zr36050 *ptr) @@ -377,8 +376,8 @@ zr36050_set_sof (struct zr36050 *ptr) /* ------------------------------------------------------------------------- */ -/* SOS (start of scan) segment depends on the used scan components - of each color component */ +/* SOS (start of scan) segment depends on the used scan components + of each color component */ static int zr36050_set_sos (struct zr36050 *ptr) @@ -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);