summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ivtv/ivtv-driver.c
diff options
context:
space:
mode:
authorHans Verkuil2007-07-10 19:58:33 +0200
committerMauro Carvalho Chehab2007-07-18 19:24:47 +0200
commitf885969196da6ae905162c0d1c5f0553de12cb40 (patch)
tree3d23cbba88366834d05d8b6a63c6889caf789b37 /drivers/media/video/ivtv/ivtv-driver.c
parentV4L/DVB (5841): tveeprom: add support for Philips FQ1216LME MK3 tuner. (diff)
downloadkernel-qcow2-linux-f885969196da6ae905162c0d1c5f0553de12cb40.tar.gz
kernel-qcow2-linux-f885969196da6ae905162c0d1c5f0553de12cb40.tar.xz
kernel-qcow2-linux-f885969196da6ae905162c0d1c5f0553de12cb40.zip
V4L/DVB (5842): ivtv: Add locking to ensure stream setup is atomic.
Starting an MPEG and VBI capture simultaneously caused errors in the VBI setup: this setup was done twice when it should be done only for the first stream that is opened. Added a mutex to prevent this from happening. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-driver.c')
-rw-r--r--drivers/media/video/ivtv/ivtv-driver.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/video/ivtv/ivtv-driver.c b/drivers/media/video/ivtv/ivtv-driver.c
index 28a53c42020d..ab7c3f6d3531 100644
--- a/drivers/media/video/ivtv/ivtv-driver.c
+++ b/drivers/media/video/ivtv/ivtv-driver.c
@@ -623,6 +623,7 @@ static int __devinit ivtv_init_struct1(struct ivtv *itv)
itv->enc_mbox.max_mbox = 2; /* the encoder has 3 mailboxes (0-2) */
itv->dec_mbox.max_mbox = 1; /* the decoder has 2 mailboxes (0-1) */
+ mutex_init(&itv->serialize_lock);
mutex_init(&itv->i2c_bus_lock);
mutex_init(&itv->udma.lock);