diff options
author | Andreas Oberritter <devnull@localhost> | 2003-11-27 00:32:30 +0000 |
---|---|---|
committer | Andreas Oberritter <devnull@localhost> | 2003-11-27 00:32:30 +0000 |
commit | a38bee0624c90e30e21190e600d676f6e8ce1737 (patch) | |
tree | 134fd2acf901b1701c80cddec26879fdb7e4429c /linux/drivers/media/dvb/frontends/ves1820.c | |
parent | 2ff4f7e679d65787de5a6b0099b0786bbe8dc202 (diff) | |
download | mediapointer-dvb-s2-a38bee0624c90e30e21190e600d676f6e8ce1737.tar.gz mediapointer-dvb-s2-a38bee0624c90e30e21190e600d676f6e8ce1737.tar.bz2 |
- set default pwm value to 0x48 for boards which don't have an eeprom at i2c address 0x50 instead of using a random value of an uninitialized local variable.
- don't bail out if no tuner could be detected, for compatibility with boards which don't have a tuner on the same bus as the demod.
Diffstat (limited to 'linux/drivers/media/dvb/frontends/ves1820.c')
-rw-r--r-- | linux/drivers/media/dvb/frontends/ves1820.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/linux/drivers/media/dvb/frontends/ves1820.c b/linux/drivers/media/dvb/frontends/ves1820.c index bd31d1457..3471e0a08 100644 --- a/linux/drivers/media/dvb/frontends/ves1820.c +++ b/linux/drivers/media/dvb/frontends/ves1820.c @@ -462,8 +462,6 @@ static long probe_tuner (struct dvb_i2c_bus *i2c) printk ("DVB: VES1820(%d): setup for tuner sp5659c\n", i2c->adapter->num); } else { type = -1; - printk ("DVB: VES1820(%d): unknown PLL, " - "please report to <linuxdvb@linuxtv.org>!!\n", i2c->adapter->num); } return type; @@ -477,13 +475,11 @@ static u8 read_pwm (struct dvb_i2c_bus *i2c) struct i2c_msg msg [] = { { .addr = 0x50, .flags = 0, .buf = &b, .len = 1 }, { .addr = 0x50, .flags = I2C_M_RD, .buf = &pwm, .len = 1 } }; - i2c->xfer (i2c, msg, 2); + if ((i2c->xfer(i2c, msg, 2) != 2) || (pwm == 0xff)) + pwm = 0x48; printk("DVB: VES1820(%d): pwm=0x%02x\n", i2c->adapter->num, pwm); - if (pwm == 0xff) - pwm = 0x48; - return pwm; } @@ -516,8 +512,7 @@ static int ves1820_attach (struct dvb_i2c_bus *i2c, void **data) if ((demod_addr = probe_demod_addr(i2c)) < 0) return -ENODEV; - if ((tuner_type = probe_tuner(i2c)) < 0) - return -ENODEV; + tuner_type = probe_tuner(i2c); if ((i2c->adapter->num < MAX_UNITS) && pwm[i2c->adapter->num] != -1) { printk("DVB: VES1820(%d): pwm=0x%02x (user specified)\n", |