Commit 19fb1457 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

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: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 4af75653
...@@ -806,7 +806,7 @@ ssize_t videobuf_read_one(struct videobuf_queue *q, ...@@ -806,7 +806,7 @@ ssize_t videobuf_read_one(struct videobuf_queue *q,
} }
/* Locking: Caller holds q->lock */ /* 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; enum v4l2_field field;
unsigned long flags=0; unsigned long flags=0;
...@@ -862,6 +862,17 @@ static void __videobuf_read_stop(struct videobuf_queue *q) ...@@ -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) void videobuf_read_stop(struct videobuf_queue *q)
{ {
mutex_lock(&q->lock); mutex_lock(&q->lock);
...@@ -1058,6 +1069,7 @@ EXPORT_SYMBOL_GPL(videobuf_dqbuf); ...@@ -1058,6 +1069,7 @@ EXPORT_SYMBOL_GPL(videobuf_dqbuf);
EXPORT_SYMBOL_GPL(videobuf_streamon); EXPORT_SYMBOL_GPL(videobuf_streamon);
EXPORT_SYMBOL_GPL(videobuf_streamoff); EXPORT_SYMBOL_GPL(videobuf_streamoff);
EXPORT_SYMBOL_GPL(videobuf_read_start);
EXPORT_SYMBOL_GPL(videobuf_read_stop); EXPORT_SYMBOL_GPL(videobuf_read_stop);
EXPORT_SYMBOL_GPL(videobuf_stop); EXPORT_SYMBOL_GPL(videobuf_stop);
EXPORT_SYMBOL_GPL(videobuf_read_stream); EXPORT_SYMBOL_GPL(videobuf_read_stream);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment