diff options
Diffstat (limited to 'drivers/media/video/gspca/gspca.c')
-rw-r--r-- | drivers/media/video/gspca/gspca.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c index 137166d73945..31721eadc597 100644 --- a/drivers/media/video/gspca/gspca.c +++ b/drivers/media/video/gspca/gspca.c | |||
@@ -1653,7 +1653,7 @@ static int vidioc_streamoff(struct file *file, void *priv, | |||
1653 | enum v4l2_buf_type buf_type) | 1653 | enum v4l2_buf_type buf_type) |
1654 | { | 1654 | { |
1655 | struct gspca_dev *gspca_dev = video_drvdata(file); | 1655 | struct gspca_dev *gspca_dev = video_drvdata(file); |
1656 | int ret; | 1656 | int i, ret; |
1657 | 1657 | ||
1658 | if (buf_type != V4L2_BUF_TYPE_VIDEO_CAPTURE) | 1658 | if (buf_type != V4L2_BUF_TYPE_VIDEO_CAPTURE) |
1659 | return -EINVAL; | 1659 | return -EINVAL; |
@@ -1678,6 +1678,8 @@ static int vidioc_streamoff(struct file *file, void *priv, | |||
1678 | wake_up_interruptible(&gspca_dev->wq); | 1678 | wake_up_interruptible(&gspca_dev->wq); |
1679 | 1679 | ||
1680 | /* empty the transfer queues */ | 1680 | /* empty the transfer queues */ |
1681 | for (i = 0; i < gspca_dev->nframes; i++) | ||
1682 | gspca_dev->frame[i].v4l2_buf.flags &= ~BUF_ALL_FLAGS; | ||
1681 | atomic_set(&gspca_dev->fr_q, 0); | 1683 | atomic_set(&gspca_dev->fr_q, 0); |
1682 | atomic_set(&gspca_dev->fr_i, 0); | 1684 | atomic_set(&gspca_dev->fr_i, 0); |
1683 | gspca_dev->fr_o = 0; | 1685 | gspca_dev->fr_o = 0; |