summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/ivtv/ivtv-driver.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2007-07-10 19:58:33 +0200
committerHans Verkuil <hverkuil@xs4all.nl>2007-07-10 19:58:33 +0200
commite76da438552c6c94ab8fdf1216afead8a29405fc (patch)
tree6c6c8f8448e01838d9550f03fd5155aa0aa04967 /linux/drivers/media/video/ivtv/ivtv-driver.c
parent44a81a5a6b9bf5d68c00a098df36c8321a2fba3a (diff)
downloadmediapointer-dvb-s2-e76da438552c6c94ab8fdf1216afead8a29405fc.tar.gz
mediapointer-dvb-s2-e76da438552c6c94ab8fdf1216afead8a29405fc.tar.bz2
ivtv: Add locking to ensure stream setup is atomic.
From: Hans Verkuil <hverkuil@xs4all.nl> 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>
Diffstat (limited to 'linux/drivers/media/video/ivtv/ivtv-driver.c')
-rw-r--r--linux/drivers/media/video/ivtv/ivtv-driver.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/linux/drivers/media/video/ivtv/ivtv-driver.c b/linux/drivers/media/video/ivtv/ivtv-driver.c
index f10d4e7c5..9ba1d8c16 100644
--- a/linux/drivers/media/video/ivtv/ivtv-driver.c
+++ b/linux/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);