From e76da438552c6c94ab8fdf1216afead8a29405fc Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Tue, 10 Jul 2007 19:58:33 +0200 Subject: ivtv: Add locking to ensure stream setup is atomic. From: Hans Verkuil 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 --- linux/drivers/media/video/ivtv/ivtv-driver.c | 1 + 1 file changed, 1 insertion(+) (limited to 'linux/drivers/media/video/ivtv/ivtv-driver.c') 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); -- cgit v1.2.3