summaryrefslogtreecommitdiff
path: root/linux/drivers/media/common/saa7146_video.c
diff options
context:
space:
mode:
authorBrandon Philips <brandon@ifup.org>2007-11-13 15:05:38 -0800
committerBrandon Philips <brandon@ifup.org>2007-11-13 15:05:38 -0800
commit09d082411ad4e8f87e4ee8431a920f1234ca2c8c (patch)
tree201ac7e4de4b8447341aea1529310e9afbd18716 /linux/drivers/media/common/saa7146_video.c
parent512f46cb92dd3faf12d28460bb03574ad6a867ab (diff)
downloadmediapointer-dvb-s2-09d082411ad4e8f87e4ee8431a920f1234ca2c8c.tar.gz
mediapointer-dvb-s2-09d082411ad4e8f87e4ee8431a920f1234ca2c8c.tar.bz2
V4L: videobuf-core locking fixes and comments
- Add comments to functions that require that caller hold q->lock - Add __videobuf_mmap_free that doesn't hold q->lock for use within videobuf - Add locking to videobuf_mmap_free - Fix linux/drivers/media/common/saa7146_video.c which was holding lock around videobuf_read_stop - Add locking to functions that operate on a queue - Add videobuf_stop to take care of stopping in both the read and stream case TODO: bttv still has an unsafe call to videobuf_queue_is_busy Signed-off-by: Brandon Philips <bphilips@suse.de>
Diffstat (limited to 'linux/drivers/media/common/saa7146_video.c')
-rw-r--r--linux/drivers/media/common/saa7146_video.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/linux/drivers/media/common/saa7146_video.c b/linux/drivers/media/common/saa7146_video.c
index 8d73531a0..afb1b9e7d 100644
--- a/linux/drivers/media/common/saa7146_video.c
+++ b/linux/drivers/media/common/saa7146_video.c
@@ -1441,10 +1441,7 @@ static void video_close(struct saa7146_dev *dev, struct file *file)
err = saa7146_stop_preview(fh);
}
- // release all capture buffers
- mutex_lock(&q->lock);
- videobuf_read_stop(q);
- mutex_unlock(&q->lock);
+ videobuf_stop(q);
/* hmm, why is this function declared void? */
/* return err */