Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 232170
b: refs/heads/master
c: 4e770f7
h: refs/heads/master
v: v3
  • Loading branch information
Hans de Goede authored and Mauro Carvalho Chehab committed Jan 19, 2011
1 parent 83c1921 commit 0ab50c8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 82f4b5b67e795fe03952b278873712e4562304d2
refs/heads/master: 4e770f7602fb2285f3106f98109d0685618ddc22
15 changes: 9 additions & 6 deletions trunk/drivers/media/video/gspca/gspca.c
Original file line number Diff line number Diff line change
Expand Up @@ -1630,11 +1630,15 @@ static int vidioc_streamoff(struct file *file, void *priv,

if (buf_type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
return -EINVAL;
if (!gspca_dev->streaming)
return 0;

if (mutex_lock_interruptible(&gspca_dev->queue_lock))
return -ERESTARTSYS;

if (!gspca_dev->streaming) {
ret = 0;
goto out;
}

/* check the capture file */
if (gspca_dev->capt_file != file) {
ret = -EBUSY;
Expand Down Expand Up @@ -2341,12 +2345,11 @@ void gspca_disconnect(struct usb_interface *intf)
PDEBUG(D_PROBE, "%s disconnect",
video_device_node_name(&gspca_dev->vdev));
mutex_lock(&gspca_dev->usb_lock);

gspca_dev->present = 0;
wake_up_interruptible(&gspca_dev->wq);

if (gspca_dev->streaming) {
destroy_urbs(gspca_dev);
wake_up_interruptible(&gspca_dev->wq);
}
destroy_urbs(gspca_dev);

#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
gspca_input_destroy_urb(gspca_dev);
Expand Down

0 comments on commit 0ab50c8

Please sign in to comment.