Skip to content

Commit

Permalink
V4L/DVB (8824): gspca: Too much code removed in the suspend/resume ch…
Browse files Browse the repository at this point in the history
…angeset.

- the stream must stop when the main application closes the device.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Jean-Francois Moine authored and Mauro Carvalho Chehab committed Sep 3, 2008
1 parent de00448 commit a1e8288
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/media/video/gspca/gspca.c
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,11 @@ static int dev_close(struct inode *inode, struct file *file)

/* if the file did the capture, free the streaming resources */
if (gspca_dev->capt_file == file) {
if (gspca_dev->streaming) {
mutex_lock(&gspca_dev->usb_lock);
gspca_stream_off(gspca_dev);
mutex_unlock(&gspca_dev->usb_lock);
}
frame_free(gspca_dev);
gspca_dev->capt_file = NULL;
gspca_dev->memory = GSPCA_MEMORY_NO;
Expand Down

0 comments on commit a1e8288

Please sign in to comment.