Commit a1e8288b authored by Jean-Francois Moine's avatar Jean-Francois Moine Committed by Mauro Carvalho Chehab

V4L/DVB (8824): gspca: Too much code removed in the suspend/resume changeset.

- the stream must stop when the main application closes the device.
Signed-off-by: default avatarJean-Francois Moine <moinejf@free.fr>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent de00448f
...@@ -806,6 +806,11 @@ static int dev_close(struct inode *inode, struct file *file) ...@@ -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 the file did the capture, free the streaming resources */
if (gspca_dev->capt_file == file) { 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); frame_free(gspca_dev);
gspca_dev->capt_file = NULL; gspca_dev->capt_file = NULL;
gspca_dev->memory = GSPCA_MEMORY_NO; gspca_dev->memory = GSPCA_MEMORY_NO;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment