diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2007-07-10 13:58:33 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-07-18 13:24:47 -0400 |
commit | f885969196da6ae905162c0d1c5f0553de12cb40 (patch) | |
tree | 3d23cbba88366834d05d8b6a63c6889caf789b37 /drivers/media/video/ivtv/ivtv-driver.c | |
parent | 0901973f4bde9c1004795c9c2321bdc51f3996f1 (diff) |
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.c | 1 |
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) | |||
623 | itv->enc_mbox.max_mbox = 2; /* the encoder has 3 mailboxes (0-2) */ | 623 | itv->enc_mbox.max_mbox = 2; /* the encoder has 3 mailboxes (0-2) */ |
624 | itv->dec_mbox.max_mbox = 1; /* the decoder has 2 mailboxes (0-1) */ | 624 | itv->dec_mbox.max_mbox = 1; /* the decoder has 2 mailboxes (0-1) */ |
625 | 625 | ||
626 | mutex_init(&itv->serialize_lock); | ||
626 | mutex_init(&itv->i2c_bus_lock); | 627 | mutex_init(&itv->i2c_bus_lock); |
627 | mutex_init(&itv->udma.lock); | 628 | mutex_init(&itv->udma.lock); |
628 | 629 | ||