Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 306310
b: refs/heads/master
c: a3cc74d
h: refs/heads/master
v: v3
  • Loading branch information
Hans de Goede authored and Mauro Carvalho Chehab committed May 14, 2012
1 parent f40e537 commit 0e47f89
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 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: eb238732a52b100bdf4a766a50e11e6fd9bd1d83
refs/heads/master: a3cc74d4ec3f2462c6f2dfa527c126c096852f02
7 changes: 2 additions & 5 deletions trunk/drivers/media/video/gspca/gspca.c
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,7 @@ static int gspca_set_alt0(struct gspca_dev *gspca_dev)
static void gspca_stream_off(struct gspca_dev *gspca_dev)
{
gspca_dev->streaming = 0;
gspca_dev->usb_err = 0;
if (gspca_dev->sd_desc->stopN)
gspca_dev->sd_desc->stopN(gspca_dev);
destroy_urbs(gspca_dev);
Expand Down Expand Up @@ -1331,10 +1332,8 @@ static int dev_close(struct file *file)

/* if the file did the capture, free the streaming resources */
if (gspca_dev->capt_file == file) {
if (gspca_dev->streaming) {
gspca_dev->usb_err = 0;
if (gspca_dev->streaming)
gspca_stream_off(gspca_dev);
}
frame_free(gspca_dev);
}
module_put(gspca_dev->module);
Expand Down Expand Up @@ -1569,7 +1568,6 @@ static int vidioc_reqbufs(struct file *file, void *priv,
/* stop streaming */
streaming = gspca_dev->streaming;
if (streaming) {
gspca_dev->usb_err = 0;
gspca_stream_off(gspca_dev);

/* Don't restart the stream when switching from read
Expand Down Expand Up @@ -1675,7 +1673,6 @@ static int vidioc_streamoff(struct file *file, void *priv,
}

/* stop streaming */
gspca_dev->usb_err = 0;
gspca_stream_off(gspca_dev);
/* In case another thread is waiting in dqbuf */
wake_up_interruptible(&gspca_dev->wq);
Expand Down

0 comments on commit 0e47f89

Please sign in to comment.