diff options
author | Johannes Stezenbach <devnull@localhost> | 2004-07-30 13:16:31 +0000 |
---|---|---|
committer | Johannes Stezenbach <devnull@localhost> | 2004-07-30 13:16:31 +0000 |
commit | 016aa2e20f1ca4b4f5430c4e945878b73a866894 (patch) | |
tree | d1d60e343adbb005224591e1fe3fd4307d355165 /linux/drivers/media | |
parent | bc8eeb034d24fe27a013559c33c496c2fd4a678b (diff) | |
download | mediapointer-dvb-s2-016aa2e20f1ca4b4f5430c4e945878b73a866894.tar.gz mediapointer-dvb-s2-016aa2e20f1ca4b4f5430c4e945878b73a866894.tar.bz2 |
use mt352_read_register() only after card_type is set
(should fix mt352 detection)
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/dvb/frontends/mt352.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/linux/drivers/media/dvb/frontends/mt352.c b/linux/drivers/media/dvb/frontends/mt352.c index 1fbc66d99..3ae72e832 100644 --- a/linux/drivers/media/dvb/frontends/mt352.c +++ b/linux/drivers/media/dvb/frontends/mt352.c @@ -770,9 +770,6 @@ static int mt352_attach_adapter(struct i2c_adapter *i2c) mt352_info.frequency_max = FE_FREQ_MAX; mt352_info.frequency_stepsize = FE_FREQ_STEPSIZE; - if (mt352_read_register(i2c, CHIP_ID) != ID_MT352) - return -ENODEV; - if ( !(state = kmalloc(sizeof(struct mt352_state), GFP_KERNEL)) ) return -ENOMEM; @@ -795,6 +792,11 @@ static int mt352_attach_adapter(struct i2c_adapter *i2c) card_type = force_card; } + if (mt352_read_register(i2c, CHIP_ID) != ID_MT352) { + kfree(state); + return -ENODEV; + } + if (card_type == CARD_AVDVBT771) printk(KERN_INFO FRONTEND_NAME ": Setup for Avermedia 771.\n"); else if (card_type == CARD_TUA6034) |