diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-11-16 00:09:30 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-11-16 00:09:30 -0200 |
commit | b55057ae46c03a2c5e269b32371f97a7bc0646f7 (patch) | |
tree | 31233e6972fb4edc8c21414a81c470ec14d111da | |
parent | 491d2fd7bd092c0938f38d7cef3b1d6e4cbcfbc9 (diff) | |
download | mediapointer-dvb-s2-b55057ae46c03a2c5e269b32371f97a7bc0646f7.tar.gz mediapointer-dvb-s2-b55057ae46c03a2c5e269b32371f97a7bc0646f7.tar.bz2 |
Re-adds lock safe videobuf_read_start
From: Mauro Carvalho Chehab <mchehab@infradead.org>
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>
-rw-r--r-- | linux/drivers/media/video/videobuf-core.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/linux/drivers/media/video/videobuf-core.c b/linux/drivers/media/video/videobuf-core.c index ca316dc58..be33909f9 100644 --- a/linux/drivers/media/video/videobuf-core.c +++ b/linux/drivers/media/video/videobuf-core.c @@ -807,7 +807,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; @@ -863,6 +863,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); @@ -1059,6 +1070,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); |