diff options
author | Brandon Philips <brandon@ifup.org> | 2007-11-13 18:05:38 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-12-11 15:08:08 -0500 |
commit | 19bc5133dae9562e8824ef101464061f9854c1d8 (patch) | |
tree | 8395e2da25f3cf5291e24f972d31a215ddf421a5 /drivers/media/common/saa7146_video.c | |
parent | 63337dd3f5506628e4831b08e39e09d7f1407769 (diff) |
V4L/DVB (6601): 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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/common/saa7146_video.c')
-rw-r--r-- | drivers/media/common/saa7146_video.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/media/common/saa7146_video.c b/drivers/media/common/saa7146_video.c index f245a3b2ef47..7cc4213ba56b 100644 --- a/drivers/media/common/saa7146_video.c +++ b/drivers/media/common/saa7146_video.c | |||
@@ -1440,10 +1440,7 @@ static void video_close(struct saa7146_dev *dev, struct file *file) | |||
1440 | err = saa7146_stop_preview(fh); | 1440 | err = saa7146_stop_preview(fh); |
1441 | } | 1441 | } |
1442 | 1442 | ||
1443 | // release all capture buffers | 1443 | videobuf_stop(q); |
1444 | mutex_lock(&q->lock); | ||
1445 | videobuf_read_stop(q); | ||
1446 | mutex_unlock(&q->lock); | ||
1447 | 1444 | ||
1448 | /* hmm, why is this function declared void? */ | 1445 | /* hmm, why is this function declared void? */ |
1449 | /* return err */ | 1446 | /* return err */ |