aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ivtv/ivtv-driver.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-07-22 14:50:31 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-26 11:54:42 -0400
commitb654fcdc0ea3b6e5724c9873ae062bdfe7f28efe (patch)
treea7cd44165baef31933053345a18279a4f66817e0 /drivers/media/video/ivtv/ivtv-driver.c
parent38f9d308597fe3f8d52bfa30e7ed6c742b85a1db (diff)
V4L/DVB (8479): tveeprom/ivtv: fix usage of has_ir field
has_ir was set to and compared to -1 in several cases, even though it is an u32. ivtv also contained a FIXME for an old kernel that could be removed. Thanks to Roel Kluin for creating an initial patch for this. Although I chose a different solution here it did help in pointing out the problem. 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.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/video/ivtv/ivtv-driver.c b/drivers/media/video/ivtv/ivtv-driver.c
index 41fd79279bb5..aea1664948ce 100644
--- a/drivers/media/video/ivtv/ivtv-driver.c
+++ b/drivers/media/video/ivtv/ivtv-driver.c
@@ -465,9 +465,8 @@ static void ivtv_process_eeprom(struct ivtv *itv)
465 if (itv->options.radio == -1) 465 if (itv->options.radio == -1)
466 itv->options.radio = (tv.has_radio != 0); 466 itv->options.radio = (tv.has_radio != 0);
467 /* only enable newi2c if an IR blaster is present */ 467 /* only enable newi2c if an IR blaster is present */
468 /* FIXME: for 2.6.20 the test against 2 should be removed */ 468 if (itv->options.newi2c == -1 && tv.has_ir) {
469 if (itv->options.newi2c == -1 && tv.has_ir != -1 && tv.has_ir != 2) { 469 itv->options.newi2c = (tv.has_ir & 4) ? 1 : 0;
470 itv->options.newi2c = (tv.has_ir & 2) ? 1 : 0;
471 if (itv->options.newi2c) { 470 if (itv->options.newi2c) {
472 IVTV_INFO("Reopen i2c bus for IR-blaster support\n"); 471 IVTV_INFO("Reopen i2c bus for IR-blaster support\n");
473 exit_ivtv_i2c(itv); 472 exit_ivtv_i2c(itv);