diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2007-07-25 12:55:52 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-09 22:03:23 -0300 |
commit | 6e5eb59102aa6007d3ea2b382a1d3ca4112c272a (patch) | |
tree | 17b18f6d9851fac32dc3e49dd6cd0da6147abcc8 /drivers/media/video/ivtv/ivtv-driver.c | |
parent | c976bc82339437e840f7dbf0b8c89c09d3fcd75e (diff) |
V4L/DVB (5924): ivtv-fb: initializing the fb should trigger ivtv firmware load
ivtv-fb: initializing the framebuffer should trigger ivtv firmware load
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 | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/media/video/ivtv/ivtv-driver.c b/drivers/media/video/ivtv/ivtv-driver.c index 00bdcc2e8f5..55ed0305fd6 100644 --- a/drivers/media/video/ivtv/ivtv-driver.c +++ b/drivers/media/video/ivtv/ivtv-driver.c @@ -1189,6 +1189,12 @@ int ivtv_init_on_first_open(struct ivtv *itv) int fw_retry_count = 3; int video_input; + if (test_bit(IVTV_F_I_FAILED, &itv->i_flags)) + return -ENXIO; + + if (test_and_set_bit(IVTV_F_I_INITED, &itv->i_flags)) + return 0; + while (--fw_retry_count > 0) { /* load firmware */ if (ivtv_firmware_init(itv) == 0) @@ -1196,9 +1202,10 @@ int ivtv_init_on_first_open(struct ivtv *itv) if (fw_retry_count > 1) IVTV_WARN("Retry loading firmware\n"); } + if (fw_retry_count == 0) { - IVTV_ERR("Error initializing firmware\n"); - return -1; + set_bit(IVTV_F_I_FAILED, &itv->i_flags); + return -ENXIO; } /* Try and get firmware versions */ @@ -1381,6 +1388,7 @@ EXPORT_SYMBOL(ivtv_udma_setup); EXPORT_SYMBOL(ivtv_udma_unmap); EXPORT_SYMBOL(ivtv_udma_alloc); EXPORT_SYMBOL(ivtv_udma_prepare); +EXPORT_SYMBOL(ivtv_init_on_first_open); module_init(module_start); module_exit(module_cleanup); |