aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ivtv/ivtv-fb.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2007-08-25 04:41:52 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-10-09 21:07:13 -0400
commit26e9d599561e9a964bd4d7c2be0029db8aaff852 (patch)
tree0355d57f557d08771630cabdb1573381c7b99c14 /drivers/media/video/ivtv/ivtv-fb.c
parent49ebf14e249734a5f64d5bdd9aaa2ddf4bcedc51 (diff)
V4L/DVB (6115): ivtv/ivtv-fb: improve locking to avoid initialization problems
ivtv/ivtv-fb: improve locking to prevent ivtv/ivtv-fb initialization problems 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-fb.c')
-rw-r--r--drivers/media/video/ivtv/ivtv-fb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/video/ivtv/ivtv-fb.c b/drivers/media/video/ivtv/ivtv-fb.c
index e80564aed632..ffe6478682ae 100644
--- a/drivers/media/video/ivtv/ivtv-fb.c
+++ b/drivers/media/video/ivtv/ivtv-fb.c
@@ -1011,10 +1011,13 @@ static int ivtvfb_init_io(struct ivtv *itv)
1011{ 1011{
1012 struct osd_info *oi = itv->osd_info; 1012 struct osd_info *oi = itv->osd_info;
1013 1013
1014 mutex_lock(&itv->serialize_lock);
1014 if (ivtv_init_on_first_open(itv)) { 1015 if (ivtv_init_on_first_open(itv)) {
1016 mutex_unlock(&itv->serialize_lock);
1015 IVTV_FB_ERR("Failed to initialize ivtv\n"); 1017 IVTV_FB_ERR("Failed to initialize ivtv\n");
1016 return -ENXIO; 1018 return -ENXIO;
1017 } 1019 }
1020 mutex_unlock(&itv->serialize_lock);
1018 1021
1019 ivtv_fb_get_framebuffer(itv, &oi->video_rbase, &oi->video_buffer_size); 1022 ivtv_fb_get_framebuffer(itv, &oi->video_rbase, &oi->video_buffer_size);
1020 1023