Skip to content

Commit

Permalink
V4L/DVB (6609): Re-adds lock safe videobuf_read_start
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mauro Carvalho Chehab committed Dec 12, 2007
1 parent 4af7565 commit 19fb145
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion drivers/media/video/videobuf-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 19fb145

Please sign in to comment.