V4L/DVB: videobuf: prepare to make locking optional in videobuf
authorHans Verkuil <hverkuil@xs4all.nl>
Mon, 20 Sep 2010 20:24:30 +0000 (17:24 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 21 Oct 2010 03:06:14 +0000 (01:06 -0200)
commit97397687886aa8ecd4ec603fab9e70e970c11597
tree339d460b43d2ec7206c9d147d2ad6f8fcbfa3870
parentee6869afc922a9849979e49bb3bbcad794872fcb
V4L/DVB: videobuf: prepare to make locking optional in videobuf

Currently videobuf uses the vb_lock mutex to lock its data structures.
But this locking will (optionally) move into the v4l2 core, which means
that in that case vb_lock shouldn't be used since the external lock is already
held.

Prepare for this by adding a pointer to such an external mutex and
don't lock if that pointer is set.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/v4l2-mem2mem.c
drivers/media/video/videobuf-core.c
drivers/media/video/videobuf-dma-contig.c
drivers/media/video/videobuf-dma-sg.c
drivers/media/video/videobuf-vmalloc.c
include/media/videobuf-core.h