diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-11-15 23:09:30 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-12-12 08:21:37 -0200 |
commit | 19fb1457990b6b7e15586ec7331541a184233acc (patch) | |
tree | c6eb09725bb0a7734e79f99f953c2c59a0f159fd /drivers/media/video/videobuf-core.c | |
parent | 4af75653031c6d454b4ace47c1536f0d2e727e3e (diff) |
V4L/DVB (6609): Re-adds lock safe videobuf_read_start
videobuf_dvb needs videobuf_read_start. The EXPORT_SYMBOL_GPL() were removed by
a previous patch. However, videobuf_dvb needs this.
This patch re-adds videobuf_read_start, doing the proper lock.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/videobuf-core.c')
-rw-r--r-- | drivers/media/video/videobuf-core.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/media/video/videobuf-core.c b/drivers/media/video/videobuf-core.c index de2f56b19163..81f77d2b4bd3 100644 --- a/drivers/media/video/videobuf-core.c +++ b/drivers/media/video/videobuf-core.c @@ -806,7 +806,7 @@ ssize_t videobuf_read_one(struct videobuf_queue *q, } /* Locking: Caller holds q->lock */ -int videobuf_read_start(struct videobuf_queue *q) +int __videobuf_read_start(struct videobuf_queue *q) { enum v4l2_field field; unsigned long flags=0; @@ -862,6 +862,17 @@ static void __videobuf_read_stop(struct videobuf_queue *q) } +int videobuf_read_start(struct videobuf_queue *q) +{ + int rc; + + mutex_lock(&q->lock); + rc = __videobuf_read_start(q); + mutex_unlock(&q->lock); + + return rc; +} + void videobuf_read_stop(struct videobuf_queue *q) { mutex_lock(&q->lock); @@ -1058,6 +1069,7 @@ EXPORT_SYMBOL_GPL(videobuf_dqbuf); EXPORT_SYMBOL_GPL(videobuf_streamon); EXPORT_SYMBOL_GPL(videobuf_streamoff); +EXPORT_SYMBOL_GPL(videobuf_read_start); EXPORT_SYMBOL_GPL(videobuf_read_stop); EXPORT_SYMBOL_GPL(videobuf_stop); EXPORT_SYMBOL_GPL(videobuf_read_stream); |