Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 193028
b: refs/heads/master
c: 18bf99a
h: refs/heads/master
v: v3
  • Loading branch information
Jean-François Moine authored and Mauro Carvalho Chehab committed May 19, 2010
1 parent 574f111 commit d03790b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0b62b73778554cd47480ea465f0b255cc63b4336
refs/heads/master: 18bf99aa0cb80b4fa3974a511fd033c2967b04c8
12 changes: 12 additions & 0 deletions trunk/drivers/media/video/gspca/gspca.c
Original file line number Diff line number Diff line change
Expand Up @@ -1590,6 +1590,12 @@ static int vidioc_streamon(struct file *file, void *priv,
if (mutex_lock_interruptible(&gspca_dev->queue_lock))
return -ERESTARTSYS;

/* check the capture file */
if (gspca_dev->capt_file != file) {
ret = -EBUSY;
goto out;
}

if (gspca_dev->nframes == 0
|| !(gspca_dev->frame[0].v4l2_buf.flags & V4L2_BUF_FLAG_QUEUED)) {
ret = -EINVAL;
Expand Down Expand Up @@ -1627,6 +1633,12 @@ static int vidioc_streamoff(struct file *file, void *priv,
if (mutex_lock_interruptible(&gspca_dev->queue_lock))
return -ERESTARTSYS;

/* check the capture file */
if (gspca_dev->capt_file != file) {
ret = -EBUSY;
goto out;
}

/* stop streaming */
if (mutex_lock_interruptible(&gspca_dev->usb_lock)) {
ret = -ERESTARTSYS;
Expand Down

0 comments on commit d03790b

Please sign in to comment.