V4L/DVB: videobuf: add queue argument to videobuf_waiton()
authorHans Verkuil <hverkuil@xs4all.nl>
Sun, 26 Sep 2010 12:01:26 +0000 (09:01 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 21 Oct 2010 03:06:14 +0000 (01:06 -0200)
commit0e0809a58869e3e422985f868ad5e0da1fc0ba85
treee4895d60a050e15d6c4b21aa7dbc4090199efdf3
parent08bff03ed697a583612b62a6ac566bd5bce98012
V4L/DVB: videobuf: add queue argument to videobuf_waiton()

videobuf_waiton() must unlock and relock ext_lock if it has to wait.
For that to happen it needs the videobuf_queue pointer.

Don't attempt to unlock/relock q->ext_lock unless it was locked in the
first place.

vb->state has to be protected by a spinlock to be safe.

This patch is based on code from Mauro Carvalho Chehab <mchehab@redhat.com>.

[mchehab@redhat.com: add extra argument to a few missing places]
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
20 files changed:
drivers/media/common/saa7146_fops.c
drivers/media/video/bt8xx/bttv-risc.c
drivers/media/video/cx23885/cx23885-core.c
drivers/media/video/cx88/cx88-core.c
drivers/media/video/fsl-viu.c
drivers/media/video/mem2mem_testdev.c
drivers/media/video/mx1_camera.c
drivers/media/video/mx2_camera.c
drivers/media/video/mx3_camera.c
drivers/media/video/omap24xxcam.c
drivers/media/video/pxa_camera.c
drivers/media/video/saa7134/saa7134-core.c
drivers/media/video/sh_mobile_ceu_camera.c
drivers/media/video/sh_vou.c
drivers/media/video/tlg2300/pd-video.c
drivers/media/video/videobuf-core.c
drivers/media/video/videobuf-dvb.c
drivers/staging/cx25821/cx25821-core.c
drivers/staging/dt3155v4l/dt3155v4l.c
include/media/videobuf-core.h