X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fmedia%2Fvideo%2Fsaa5246a.c;h=03e772130b55f2edeec58f3febce448b1f970a72;hb=eb4225b2da2b9f3c1ee43efe58ed1415cc1d4c47;hp=76f5f5d49dae8ed162abdf3066e9962af2426aa6;hpb=9cdd79c9b99873d600d397fda012fc3f57cc2776;p=pandora-kernel.git diff --git a/drivers/media/video/saa5246a.c b/drivers/media/video/saa5246a.c index 76f5f5d49dae..03e772130b55 100644 --- a/drivers/media/video/saa5246a.c +++ b/drivers/media/video/saa5246a.c @@ -66,6 +66,7 @@ static struct video_device saa_template; /* Declared near bottom */ /* Addresses to scan */ static unsigned short normal_i2c[] = { I2C_ADDRESS, I2C_CLIENT_END }; + I2C_CLIENT_INSMOD; static struct i2c_client client_template; @@ -111,7 +112,7 @@ static int saa5246a_attach(struct i2c_adapter *adap, int addr, int kind) for (pgbuf = 0; pgbuf < NUM_DAUS; pgbuf++) { memset(t->pgbuf[pgbuf], ' ', sizeof(t->pgbuf[0])); - t->is_searching[pgbuf] = FALSE; + t->is_searching[pgbuf] = false; } vd->priv=t; @@ -187,19 +188,21 @@ static int i2c_senddata(struct saa5246a_device *t, ...) { unsigned char buf[64]; int v; - int ct=0; + int ct = 0; va_list argp; - va_start(argp,t); + va_start(argp, t); + + while ((v = va_arg(argp, int)) != -1) + buf[ct++] = v; - while((v=va_arg(argp,int))!=-1) - buf[ct++]=v; + va_end(argp); return i2c_sendbuf(t, buf[0], ct-1, buf+1); } -/* Get count number of bytes from I²C-device at address adr, store them in buf. +/* Get count number of bytes from I²C-device at address adr, store them in buf. * Start & stop handshaking is done by this routine, ack will be sent after the - * last byte to inhibit further sending of data. If uaccess is TRUE, data is - * written to user-space with put_user. Returns -1 if I²C-device didn't send + * last byte to inhibit further sending of data. If uaccess is 'true', data is + * written to user-space with put_user. Returns -1 if I²C-device didn't send * acknowledge, 0 otherwise */ static int i2c_getdata(struct saa5246a_device *t, int count, u8 *buf) @@ -338,7 +341,7 @@ static int saa5246a_request_page(struct saa5246a_device *t, return -EIO; } - t->is_searching[req->pgbuf] = TRUE; + t->is_searching[req->pgbuf] = true; return 0; } @@ -452,7 +455,7 @@ static inline int saa5246a_get_status(struct saa5246a_device *t, } } if (!info->hamming && !info->notfound) - t->is_searching[dau_no] = FALSE; + t->is_searching[dau_no] = false; return 0; } @@ -564,7 +567,7 @@ static inline int saa5246a_stop_dau(struct saa5246a_device *t, { return -EIO; } - t->is_searching[dau_no] = FALSE; + t->is_searching[dau_no] = false; return 0; }