aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-11-15 21:09:30 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-12-12 05:21:37 -0500
commit19fb1457990b6b7e15586ec7331541a184233acc (patch)
treec6eb09725bb0a7734e79f99f953c2c59a0f159fd
parent4af75653031c6d454b4ace47c1536f0d2e727e3e (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>
-rw-r--r--drivers/media/video/videobuf-core.c14
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,
806} 806}
807 807
808/* Locking: Caller holds q->lock */ 808/* Locking: Caller holds q->lock */
809int videobuf_read_start(struct videobuf_queue *q) 809int __videobuf_read_start(struct videobuf_queue *q)
810{ 810{
811 enum v4l2_field field; 811 enum v4l2_field field;
812 unsigned long flags=0; 812 unsigned long flags=0;
@@ -862,6 +862,17 @@ static void __videobuf_read_stop(struct videobuf_queue *q)
862 862
863} 863}
864 864
865int videobuf_read_start(struct videobuf_queue *q)
866{
867 int rc;
868
869 mutex_lock(&q->lock);
870 rc = __videobuf_read_start(q);
871 mutex_unlock(&q->lock);
872
873 return rc;
874}
875
865void videobuf_read_stop(struct videobuf_queue *q) 876void videobuf_read_stop(struct videobuf_queue *q)
866{ 877{
867 mutex_lock(&q->lock); 878 mutex_lock(&q->lock);
@@ -1058,6 +1069,7 @@ EXPORT_SYMBOL_GPL(videobuf_dqbuf);
1058EXPORT_SYMBOL_GPL(videobuf_streamon); 1069EXPORT_SYMBOL_GPL(videobuf_streamon);
1059EXPORT_SYMBOL_GPL(videobuf_streamoff); 1070EXPORT_SYMBOL_GPL(videobuf_streamoff);
1060 1071
1072EXPORT_SYMBOL_GPL(videobuf_read_start);
1061EXPORT_SYMBOL_GPL(videobuf_read_stop); 1073EXPORT_SYMBOL_GPL(videobuf_read_stop);
1062EXPORT_SYMBOL_GPL(videobuf_stop); 1074EXPORT_SYMBOL_GPL(videobuf_stop);
1063EXPORT_SYMBOL_GPL(videobuf_read_stream); 1075EXPORT_SYMBOL_GPL(videobuf_read_stream);