summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/gspca/gspca.c
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2008-08-26 17:19:01 +0200
committerJean-Francois Moine <moinejf@free.fr>2008-08-26 17:19:01 +0200
commit9e52f3b33af01dab9cb1f535dd0eca88c2f93850 (patch)
treead9c7594a49e4c57eaab00fd4a19446079146973 /linux/drivers/media/video/gspca/gspca.c
parentb055b53a9475e458a3c95cb67cd1b222c08f88ba (diff)
downloadmediapointer-dvb-s2-9e52f3b33af01dab9cb1f535dd0eca88c2f93850.tar.gz
mediapointer-dvb-s2-9e52f3b33af01dab9cb1f535dd0eca88c2f93850.tar.bz2
gspca: Too much code removed in the suspend/resume changeset.
From: Jean-Francois Moine <moinejf@free.fr> - the stream must stop when the main application closes the device. Priority: high Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Diffstat (limited to 'linux/drivers/media/video/gspca/gspca.c')
-rw-r--r--linux/drivers/media/video/gspca/gspca.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/linux/drivers/media/video/gspca/gspca.c b/linux/drivers/media/video/gspca/gspca.c
index 3eec358a7..46765fee3 100644
--- a/linux/drivers/media/video/gspca/gspca.c
+++ b/linux/drivers/media/video/gspca/gspca.c
@@ -813,6 +813,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;