ChangeSet 1.2065.3.36, 2005/03/12 08:30:23-08:00, [EMAIL PROTECTED]

        [PATCH] media/zr36120: replace interruptible_sleep_on() with 
wait_event_interruptible()
        
        Use wait_event_interruptible() instead of the deprecated
        interruptible_sleep_on().
        
        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]>



 zr36120.c |   34 ++++++++++++++++------------------
 1 files changed, 16 insertions(+), 18 deletions(-)


diff -Nru a/drivers/media/video/zr36120.c b/drivers/media/video/zr36120.c
--- a/drivers/media/video/zr36120.c     2005-03-12 21:32:16 -08:00
+++ b/drivers/media/video/zr36120.c     2005-03-12 21:32:16 -08:00
@@ -30,6 +30,7 @@
 #include <linux/mm.h>
 #include <linux/pci.h>
 #include <linux/signal.h>
+#include <linux/wait.h>
 #include <asm/io.h>
 #include <asm/pgtable.h>
 #include <asm/page.h>
@@ -899,12 +900,11 @@
                zoran_cap(ztv, 1);
 
                /* wait till this buffer gets grabbed */
-               while (unused->status == FBUFFER_BUSY) {
-                       interruptible_sleep_on(&ztv->grabq);
-                       /* see if a signal did it */
-                       if (signal_pending(current))
-                               return -EINTR;
-               }
+               wait_event_interruptible(ztv->grabq,
+                               (unused->status != FBUFFER_BUSY));
+               /* see if a signal did it */
+               if (signal_pending(current))
+                       return -EINTR;
                done = unused;
        }
        else
@@ -1326,12 +1326,11 @@
                        return -EINVAL;
                 case FBUFFER_BUSY:
                        /* wait till this buffer gets grabbed */
-                       while (ztv->grabinfo[i].status == FBUFFER_BUSY) {
-                               interruptible_sleep_on(&ztv->grabq);
-                               /* see if a signal did it */
-                               if (signal_pending(current))
-                                       return -EINTR;
-                       }
+                       wait_event_interruptible(ztv->grabq,
+                                       (ztv->grabinfo[i].status != 
FBUFFER_BUSY));
+                       /* see if a signal did it */
+                       if (signal_pending(current))
+                               return -EINTR;
                        /* don't fall through; a DONE buffer is not UNUSED */
                        break;
                 case FBUFFER_DONE:
@@ -1640,12 +1639,11 @@
                zoran_cap(ztv, 1);
 
                /* wait till this buffer gets grabbed */
-               while (unused->status == FBUFFER_BUSY) {
-                       interruptible_sleep_on(&ztv->vbiq);
-                       /* see if a signal did it */
-                       if (signal_pending(current))
-                               return -EINTR;
-               }
+               wait_event_interruptible(ztv->vbiq,
+                               (unused->status != FBUFFER_BUSY));
+               /* see if a signal did it */
+               if (signal_pending(current))
+                       return -EINTR;
                done = unused;
        }
        else
-
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