ChangeSet 1.2065.3.40, 2005/03/12 08:31:28-08:00, [EMAIL PROTECTED]

        [PATCH] media/saa7110: remove sleep_on*() usage
        
        Directly use wait-queues instead of the deprecated sleep_on_timeout().  
Since
        the sleep in this function is unconditional, wait_event_timeout() does 
not
        appear to be appropriate.  Patch is compile-tested.
        
        Signed-off-by: Nishanth Aravamudan <[EMAIL PROTECTED]>
        Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
        Signed-off-by: Gerd Knorr <[EMAIL PROTECTED]>
        Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
        Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>



 saa7110.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)


diff -Nru a/drivers/media/video/saa7110.c b/drivers/media/video/saa7110.c
--- a/drivers/media/video/saa7110.c     2005-03-12 21:33:06 -08:00
+++ b/drivers/media/video/saa7110.c     2005-03-12 21:33:06 -08:00
@@ -30,6 +30,7 @@
 #include <linux/types.h>
 #include <linux/delay.h>
 #include <linux/slab.h>
+#include <linux/wait.h>
 #include <asm/io.h>
 #include <asm/uaccess.h>
 
@@ -205,13 +206,16 @@
 static int
 determine_norm (struct i2c_client *client)
 {
+       DEFINE_WAIT(wait);
        struct saa7110 *decoder = i2c_get_clientdata(client);
        int status;
 
        /* mode changed, start automatic detection */
        saa7110_write_block(client, initseq, sizeof(initseq));
        saa7110_selmux(client, decoder->input);
-       sleep_on_timeout(&decoder->wq, HZ / 4);
+       prepare_to_wait(&decoder->wq, &wait, TASK_UNINTERRUPTIBLE);
+       schedule_timeout(HZ/4);
+       finish_wait(&decoder->wq, &wait);
        status = saa7110_read(client);
        if (status & 0x40) {
                dprintk(1, KERN_INFO "%s: status=0x%02x (no signal)\n",
@@ -250,7 +254,9 @@
        saa7110_write(client, 0x11, 0x59);
        //saa7110_write(client,0x2E,0x9A);
 
-       sleep_on_timeout(&decoder->wq, HZ / 4);
+       prepare_to_wait(&decoder->wq, &wait, TASK_UNINTERRUPTIBLE);
+       schedule_timeout(HZ/4);
+       finish_wait(&decoder->wq, &wait);
 
        status = saa7110_read(client);
        if ((status & 0x03) == 0x01) {
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to