diff options
author | Mauro Carvalho Chehab <devnull@localhost> | 2005-08-01 02:58:21 +0000 |
---|---|---|
committer | Mauro Carvalho Chehab <devnull@localhost> | 2005-08-01 02:58:21 +0000 |
commit | 4a47889870106c1062907a3c5fb1d578f13f53fd (patch) | |
tree | 053cecbdb6bb754654bf36ed91cd2329d4237184 /linux/drivers/media/video/tea5767.c | |
parent | a9ff6140f8e92cc2bf177238abadec338e4ed6a2 (diff) | |
download | mediapointer-dvb-s2-4a47889870106c1062907a3c5fb1d578f13f53fd.tar.gz mediapointer-dvb-s2-4a47889870106c1062907a3c5fb1d578f13f53fd.tar.bz2 |
- tea5767 autodetection fixed.
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'linux/drivers/media/video/tea5767.c')
-rw-r--r-- | linux/drivers/media/video/tea5767.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/linux/drivers/media/video/tea5767.c b/linux/drivers/media/video/tea5767.c index 5331301e9..4327d50be 100644 --- a/linux/drivers/media/video/tea5767.c +++ b/linux/drivers/media/video/tea5767.c @@ -2,7 +2,7 @@ * For Philips TEA5767 FM Chip used on some TV Cards like Prolink Pixelview * I2C address is allways 0xC0. * - * $Id: tea5767.c,v 1.27 2005/07/31 12:10:56 mchehab Exp $ + * $Id: tea5767.c,v 1.28 2005/08/01 02:58:21 mchehab Exp $ * * Copyright (c) 2005 Mauro Carvalho Chehab (mchehab@brturbo.com.br) * This code is placed under the terms of the GNU General Public License @@ -300,7 +300,7 @@ int tea5767_autodetection(struct i2c_client *c) int div; #endif - if (5 != (rc = i2c_master_recv(c, buffer, 5))) { + if ((rc = i2c_master_recv(c, buffer, 7))< 5) { tuner_warn("It is not a TEA5767. Received %i bytes.\n", rc); return EINVAL; } @@ -317,7 +317,7 @@ int tea5767_autodetection(struct i2c_client *c) * bit 0 : internally set to 0 * Byte 5: bit 7:0 : == 0 */ - if (!((buffer[3] & 0x0f) == 0x00) && (buffer[4] == 0x00)) { + if (((buffer[3] & 0x0f) != 0x00) || (buffer[4] != 0x00)) { tuner_warn("Chip ID is not zero. It is not a TEA5767\n"); return EINVAL; } |