diff options
Diffstat (limited to 'linux/drivers')
-rw-r--r-- | linux/drivers/media/common/tuners/tea5767.c | 16 | ||||
-rw-r--r-- | linux/drivers/media/video/tuner-core.c | 4 |
2 files changed, 10 insertions, 10 deletions
diff --git a/linux/drivers/media/common/tuners/tea5767.c b/linux/drivers/media/common/tuners/tea5767.c index e5bfc72a4..5990a63ef 100644 --- a/linux/drivers/media/common/tuners/tea5767.c +++ b/linux/drivers/media/common/tuners/tea5767.c @@ -380,14 +380,14 @@ int tea5767_autodetection(struct i2c_adapter* i2c_adap, u8 i2c_addr) if ((rc = tuner_i2c_xfer_recv(&i2c, buffer, 7))< 5) { printk(KERN_WARNING "It is not a TEA5767. Received %i bytes.\n", rc); - return EINVAL; + return -EINVAL; } /* If all bytes are the same then it's a TV tuner and not a tea5767 */ if (buffer[0] == buffer[1] && buffer[0] == buffer[2] && buffer[0] == buffer[3] && buffer[0] == buffer[4]) { printk(KERN_WARNING "All bytes are equal. It is not a TEA5767\n"); - return EINVAL; + return -EINVAL; } /* Status bytes: @@ -397,14 +397,14 @@ int tea5767_autodetection(struct i2c_adapter* i2c_adap, u8 i2c_addr) */ if (((buffer[3] & 0x0f) != 0x00) || (buffer[4] != 0x00)) { printk(KERN_WARNING "Chip ID is not zero. It is not a TEA5767\n"); - return EINVAL; + return -EINVAL; } #if 0 /* Not working for TEA5767 in Beholder Columbus card */ /* It seems that tea5767 returns 0xff after the 5th byte */ if ((buffer[5] != 0xff) || (buffer[6] != 0xff)) { printk(KERN_WARNING "Returned more than 5 bytes. It is not a TEA5767\n"); - return EINVAL; + return -EINVAL; } #endif @@ -425,7 +425,7 @@ int tea5767_autodetection(struct i2c_adapter* i2c_adap, u8 i2c_addr) if (5 != (rc = tuner_i2c_xfer_recv(&i2c, buffer, 5))) { printk(KERN_WARNING "It is not a TEA5767. Received %i bytes.\n", rc); - return EINVAL; + return -EINVAL; } /* Initial freq for 32.768KHz clock */ @@ -433,7 +433,7 @@ int tea5767_autodetection(struct i2c_adapter* i2c_adap, u8 i2c_addr) printk(KERN_WARNING "It is not a TEA5767. div=%d, Return: %02x %02x %02x %02x %02x\n", div,buffer[0],buffer[1],buffer[2],buffer[3],buffer[4]); tea5767_status_dump(buffer); - return EINVAL; + return -EINVAL; } #endif return 0; @@ -490,8 +490,8 @@ struct dvb_frontend *tea5767_attach(struct dvb_frontend *fe, struct tea5767_priv *priv = NULL; #if 0 /* By removing autodetection allows forcing TEA chip */ - if (tea5767_autodetection(i2c_adap, i2c_addr) == EINVAL) - return EINVAL; + if (tea5767_autodetection(i2c_adap, i2c_addr) == -EINVAL) + return -EINVAL; #endif priv = kzalloc(sizeof(struct tea5767_priv), GFP_KERNEL); if (priv == NULL) diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c index 818fa7008..f4cac029f 100644 --- a/linux/drivers/media/video/tuner-core.c +++ b/linux/drivers/media/video/tuner-core.c @@ -1208,7 +1208,7 @@ static int tuner_probe(struct i2c_client *client) /* If chip is not tda8290, don't register. since it can be tda9887*/ if (tuner_symbol_probe(tda829x_probe, t->i2c->adapter, - t->i2c->addr) == 0) { + t->i2c->addr) >= 0) { tuner_dbg("tda829x detected\n"); } else { /* Default is being tda9887 */ @@ -1222,7 +1222,7 @@ static int tuner_probe(struct i2c_client *client) case 0x60: if (tuner_symbol_probe(tea5767_autodetection, t->i2c->adapter, t->i2c->addr) - != EINVAL) { + >= 0) { t->type = TUNER_TEA5767; t->mode_mask = T_RADIO; t->mode = T_STANDBY; |