Commit 98dcb39d authored by Gerd Knorr's avatar Gerd Knorr Committed by Linus Torvalds

[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: default avatarNishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: default avatarDomen Puncer <domen@coderock.org>
Signed-off-by: default avatarGerd Knorr <kraxel@bytesex.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 3df31a7b
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/signal.h> #include <linux/signal.h>
#include <linux/wait.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/page.h> #include <asm/page.h>
...@@ -899,12 +900,11 @@ long zoran_read(struct video_device* dev, char* buf, unsigned long count, int no ...@@ -899,12 +900,11 @@ long zoran_read(struct video_device* dev, char* buf, unsigned long count, int no
zoran_cap(ztv, 1); zoran_cap(ztv, 1);
/* wait till this buffer gets grabbed */ /* wait till this buffer gets grabbed */
while (unused->status == FBUFFER_BUSY) { wait_event_interruptible(ztv->grabq,
interruptible_sleep_on(&ztv->grabq); (unused->status != FBUFFER_BUSY));
/* see if a signal did it */ /* see if a signal did it */
if (signal_pending(current)) if (signal_pending(current))
return -EINTR; return -EINTR;
}
done = unused; done = unused;
} }
else else
...@@ -1326,12 +1326,11 @@ int zoran_ioctl(struct video_device* dev, unsigned int cmd, void *arg) ...@@ -1326,12 +1326,11 @@ int zoran_ioctl(struct video_device* dev, unsigned int cmd, void *arg)
return -EINVAL; return -EINVAL;
case FBUFFER_BUSY: case FBUFFER_BUSY:
/* wait till this buffer gets grabbed */ /* wait till this buffer gets grabbed */
while (ztv->grabinfo[i].status == FBUFFER_BUSY) { wait_event_interruptible(ztv->grabq,
interruptible_sleep_on(&ztv->grabq); (ztv->grabinfo[i].status != FBUFFER_BUSY));
/* see if a signal did it */ /* see if a signal did it */
if (signal_pending(current)) if (signal_pending(current))
return -EINTR; return -EINTR;
}
/* don't fall through; a DONE buffer is not UNUSED */ /* don't fall through; a DONE buffer is not UNUSED */
break; break;
case FBUFFER_DONE: case FBUFFER_DONE:
...@@ -1640,12 +1639,11 @@ long vbi_read(struct video_device* dev, char* buf, unsigned long count, int nonb ...@@ -1640,12 +1639,11 @@ long vbi_read(struct video_device* dev, char* buf, unsigned long count, int nonb
zoran_cap(ztv, 1); zoran_cap(ztv, 1);
/* wait till this buffer gets grabbed */ /* wait till this buffer gets grabbed */
while (unused->status == FBUFFER_BUSY) { wait_event_interruptible(ztv->vbiq,
interruptible_sleep_on(&ztv->vbiq); (unused->status != FBUFFER_BUSY));
/* see if a signal did it */ /* see if a signal did it */
if (signal_pending(current)) if (signal_pending(current))
return -EINTR; return -EINTR;
}
done = unused; done = unused;
} }
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment