]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/saa6588.c
Pull pnpacpi into acpica branch
[linux-2.6-omap-h63xx.git] / drivers / media / video / saa6588.c
index 72b70eb5da1d70e5f586dabfea18e1effad28a74..d60a783e04730b53c67c1a0b6ca5f4a8e2a8dfd3 100644 (file)
@@ -31,7 +31,6 @@
 #include <linux/wait.h>
 #include <asm/uaccess.h>
 
-#include <media/id.h>
 
 #include "rds.h"
 
@@ -246,7 +245,7 @@ static void block_to_buf(struct saa6588 *s, unsigned char *blockbuf)
                s->wr_index = 0;
 
        if (s->wr_index == s->rd_index) {
-               s->rd_index++;
+               s->rd_index += 3;
                if (s->rd_index >= s->buf_size)
                        s->rd_index = 0;
        } else
@@ -328,7 +327,7 @@ static void saa6588_work(void *data)
        struct saa6588 *s = (struct saa6588 *)data;
 
        saa6588_i2c_poll(s);
-       mod_timer(&s->timer, jiffies + HZ / 50);        /* 20 msec */
+       mod_timer(&s->timer, jiffies + msecs_to_jiffies(20));
 }
 
 static int saa6588_configure(struct saa6588 *s)
@@ -423,7 +422,6 @@ static int saa6588_attach(struct i2c_adapter *adap, int addr, int kind)
        s->timer.function = saa6588_timer;
        s->timer.data = (unsigned long)s;
        schedule_work(&s->work);
-
        return 0;
 }
 
@@ -434,9 +432,9 @@ static int saa6588_probe(struct i2c_adapter *adap)
                return i2c_probe(adap, &addr_data, saa6588_attach);
 #else
        switch (adap->id) {
-       case I2C_ALGO_BIT | I2C_HW_B_BT848:
-       case I2C_ALGO_BIT | I2C_HW_B_RIVA:
-       case I2C_ALGO_SAA7134:
+       case I2C_HW_B_BT848:
+       case I2C_HW_B_RIVA:
+       case I2C_HW_SAA7134:
                return i2c_probe(adap, &addr_data, saa6588_attach);
                break;
        }
@@ -497,10 +495,10 @@ static int saa6588_command(struct i2c_client *client, unsigned int cmd,
 /* ----------------------------------------------------------------------- */
 
 static struct i2c_driver driver = {
-       .owner = THIS_MODULE,
-       .name = "i2c saa6588 driver",
+       .driver = {
+               .name = "i2c saa6588 driver",
+       },
        .id = -1,               /* FIXME */
-       .flags = I2C_DF_NOTIFY,
        .attach_adapter = saa6588_probe,
        .detach_client = saa6588_detach,
        .command = saa6588_command,
@@ -508,7 +506,6 @@ static struct i2c_driver driver = {
 
 static struct i2c_client client_template = {
        .name = "saa6588",
-       .flags = I2C_CLIENT_ALLOW_USE,
        .driver = &driver,
 };