V4L/DVB (6271): V4L: Add basic support for suspend/resume for saa7134
[safe/jmp/linux-2.6] / drivers / media / video / saa7110.c
index 36123fa..061134a 100644 (file)
@@ -39,11 +39,11 @@ MODULE_AUTHOR("Pauline Middelink");
 MODULE_LICENSE("GPL");
 
 #include <linux/i2c.h>
-#include <linux/i2c-dev.h>
 
 #define I2C_NAME(s) (s)->name
 
 #include <linux/videodev.h>
+#include <media/v4l2-common.h>
 #include <linux/video_decoder.h>
 
 static int debug = 0;
@@ -140,7 +140,7 @@ saa7110_read (struct i2c_client *client)
 
 static int
 saa7110_selmux (struct i2c_client *client,
-               int                chan)
+               int                chan)
 {
        static const unsigned char modes[9][8] = {
                /* mode 0 */
@@ -208,7 +208,7 @@ determine_norm (struct i2c_client *client)
        saa7110_write_block(client, initseq, sizeof(initseq));
        saa7110_selmux(client, decoder->input);
        prepare_to_wait(&decoder->wq, &wait, TASK_UNINTERRUPTIBLE);
-       schedule_timeout(HZ/4);
+       schedule_timeout(msecs_to_jiffies(250));
        finish_wait(&decoder->wq, &wait);
        status = saa7110_read(client);
        if (status & 0x40) {
@@ -249,7 +249,7 @@ determine_norm (struct i2c_client *client)
        //saa7110_write(client,0x2E,0x9A);
 
        prepare_to_wait(&decoder->wq, &wait, TASK_UNINTERRUPTIBLE);
-       schedule_timeout(HZ/4);
+       schedule_timeout(msecs_to_jiffies(250));
        finish_wait(&decoder->wq, &wait);
 
        status = saa7110_read(client);
@@ -458,7 +458,7 @@ static unsigned short normal_i2c[] = {
 };
 
 static unsigned short ignore = I2C_CLIENT_END;
-                                                                                
+
 static struct i2c_client_address_data addr_data = {
        .normal_i2c             = normal_i2c,
        .probe                  = &ignore,