Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92798
b: refs/heads/master
c: 867e835
h: refs/heads/master
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Apr 24, 2008
1 parent 714b05c commit 54939c7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a589b66546d3d81e28dd95d3463c9e9da3d68728
refs/heads/master: 867e835f4db4eba6d49072382cc05fc210c4ed1c
15 changes: 10 additions & 5 deletions trunk/drivers/media/video/tea5761.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,14 +247,19 @@ int tea5761_autodetection(struct i2c_adapter* i2c_adap, u8 i2c_addr)

if (16 != (rc = tuner_i2c_xfer_recv(&i2c, buffer, 16))) {
printk(KERN_WARNING "it is not a TEA5761. Received %i chars.\n", rc);
return EINVAL;
return -EINVAL;
}

if (!((buffer[13] != 0x2b) || (buffer[14] != 0x57) || (buffer[15] != 0x061))) {
printk(KERN_WARNING "Manufacturer ID= 0x%02x, Chip ID = %02x%02x. It is not a TEA5761\n",buffer[13],buffer[14],buffer[15]);
return EINVAL;
if ((buffer[13] != 0x2b) || (buffer[14] != 0x57) || (buffer[15] != 0x061)) {
printk(KERN_WARNING "Manufacturer ID= 0x%02x, Chip ID = %02x%02x."
" It is not a TEA5761\n",
buffer[13], buffer[14], buffer[15]);
return -EINVAL;
}
printk(KERN_WARNING "TEA5761 detected.\n");
printk(KERN_WARNING "tea5761: TEA%02x%02x detected. "
"Manufacturer ID= 0x%02x\n",
buffer[14], buffer[15], buffer[13]);

return 0;
}

Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/media/video/tuner-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1111,8 +1111,8 @@ static int tuner_probe(struct i2c_client *client)
if (!no_autodetect) {
switch (client->addr) {
case 0x10:
if (tea5761_autodetection(t->i2c->adapter, t->i2c->addr)
!= EINVAL) {
if (tea5761_autodetection(t->i2c->adapter,
t->i2c->addr) >= 0) {
t->type = TUNER_TEA5761;
t->mode_mask = T_RADIO;
t->mode = T_STANDBY;
Expand All @@ -1124,7 +1124,7 @@ static int tuner_probe(struct i2c_client *client)

goto register_client;
}
break;
return -ENODEV;
case 0x42:
case 0x43:
case 0x4a:
Expand Down

0 comments on commit 54939c7

Please sign in to comment.