From: Jean-Francois Moine Date: Wed, 3 Sep 2008 20:12:17 +0000 (-0300) Subject: V4L/DVB (8824): gspca: Too much code removed in the suspend/resume changeset. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a1e8288b1d80130119692818b46694660f28e03a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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: Jean-Francois Moine Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c index fe096e76e5c3..42b0b83d0953 100644 --- a/drivers/media/video/gspca/gspca.c +++ b/drivers/media/video/gspca/gspca.c @@ -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;