diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-11-15 21:09:30 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-12-12 05:21:37 -0500 |
commit | 19fb1457990b6b7e15586ec7331541a184233acc (patch) | |
tree | c6eb09725bb0a7734e79f99f953c2c59a0f159fd /drivers | |
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')
-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, | |||
806 | } | 806 | } |
807 | 807 | ||
808 | /* Locking: Caller holds q->lock */ | 808 | /* Locking: Caller holds q->lock */ |
809 | int videobuf_read_start(struct videobuf_queue *q) | 809 | int __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 | ||
865 | int 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 | |||
865 | void videobuf_read_stop(struct videobuf_queue *q) | 876 | void 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); | |||
1058 | EXPORT_SYMBOL_GPL(videobuf_streamon); | 1069 | EXPORT_SYMBOL_GPL(videobuf_streamon); |
1059 | EXPORT_SYMBOL_GPL(videobuf_streamoff); | 1070 | EXPORT_SYMBOL_GPL(videobuf_streamoff); |
1060 | 1071 | ||
1072 | EXPORT_SYMBOL_GPL(videobuf_read_start); | ||
1061 | EXPORT_SYMBOL_GPL(videobuf_read_stop); | 1073 | EXPORT_SYMBOL_GPL(videobuf_read_stop); |
1062 | EXPORT_SYMBOL_GPL(videobuf_stop); | 1074 | EXPORT_SYMBOL_GPL(videobuf_stop); |
1063 | EXPORT_SYMBOL_GPL(videobuf_read_stream); | 1075 | EXPORT_SYMBOL_GPL(videobuf_read_stream); |