diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-07-22 20:50:31 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2008-07-22 20:50:31 +0200 |
commit | 6663286ec924d58968a88f5cb07ba47bf5bb41b2 (patch) | |
tree | 26c26cee21cdd2d42f6cfffb94e7500cfe700a12 /linux/drivers/media/video/ivtv | |
parent | 4af3189282424ed07479ccfa87420d4fbb01b62e (diff) | |
download | mediapointer-dvb-s2-6663286ec924d58968a88f5cb07ba47bf5bb41b2.tar.gz mediapointer-dvb-s2-6663286ec924d58968a88f5cb07ba47bf5bb41b2.tar.bz2 |
tveeprom/ivtv: fix usage of has_ir field
From: Hans Verkuil <hverkuil@xs4all.nl>
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>
Diffstat (limited to 'linux/drivers/media/video/ivtv')
-rw-r--r-- | linux/drivers/media/video/ivtv/ivtv-driver.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/linux/drivers/media/video/ivtv/ivtv-driver.c b/linux/drivers/media/video/ivtv/ivtv-driver.c index c0b98a83b..efdb59193 100644 --- a/linux/drivers/media/video/ivtv/ivtv-driver.c +++ b/linux/drivers/media/video/ivtv/ivtv-driver.c @@ -465,9 +465,8 @@ static void ivtv_process_eeprom(struct ivtv *itv) if (itv->options.radio == -1) itv->options.radio = (tv.has_radio != 0); /* only enable newi2c if an IR blaster is present */ - /* FIXME: for 2.6.20 the test against 2 should be removed */ - if (itv->options.newi2c == -1 && tv.has_ir != -1 && tv.has_ir != 2) { - itv->options.newi2c = (tv.has_ir & 2) ? 1 : 0; + if (itv->options.newi2c == -1 && tv.has_ir) { + itv->options.newi2c = (tv.has_ir & 4) ? 1 : 0; if (itv->options.newi2c) { IVTV_INFO("Reopen i2c bus for IR-blaster support\n"); exit_ivtv_i2c(itv); |