Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d0ae15d authored by Hans de Goede's avatar Hans de Goede Committed by Mauro Carvalho Chehab
Browse files

[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: default avatarHans de Goede <hdegoede@redhat.com>
Acked-by: default avatarJean-Francois Moine <moinejf@free.fr>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent ce5610bc
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -1634,6 +1634,8 @@ static int vidioc_streamoff(struct file *file, void *priv,
	gspca_dev->usb_err = 0;
	gspca_dev->usb_err = 0;
	gspca_stream_off(gspca_dev);
	gspca_stream_off(gspca_dev);
	mutex_unlock(&gspca_dev->usb_lock);
	mutex_unlock(&gspca_dev->usb_lock);
	/* In case another thread is waiting in dqbuf */
	wake_up_interruptible(&gspca_dev->wq);


	/* empty the transfer queues */
	/* empty the transfer queues */
	atomic_set(&gspca_dev->fr_q, 0);
	atomic_set(&gspca_dev->fr_q, 0);