summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2010-12-31 17:17:51 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-01-19 11:45:00 -0200
commit0d0ae15dde7d4a778056268e64bb2625f84deab6 (patch)
tree1ed3ac1b82eab0ec82da2ee3e54f11d6dadf40bc /drivers/media/video/gspca
parentce5610bca74571674c1970d33063e7c06295a9a4 (diff)
[media] gspca_main: wake wq on streamoff
We check for not streaming as a condition to abort waiting in dqbuf, so when another thread does a streamoff we should wake the wq. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca')
-rw-r--r--drivers/media/video/gspca/gspca.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c
index 4ab906be896..3581dea3c1f 100644
--- a/drivers/media/video/gspca/gspca.c
+++ b/drivers/media/video/gspca/gspca.c
@@ -1634,6 +1634,8 @@ static int vidioc_streamoff(struct file *file, void *priv,
gspca_dev->usb_err = 0;
gspca_stream_off(gspca_dev);
mutex_unlock(&gspca_dev->usb_lock);
+ /* In case another thread is waiting in dqbuf */
+ wake_up_interruptible(&gspca_dev->wq);
/* empty the transfer queues */
atomic_set(&gspca_dev->fr_q, 0);