From 4a47889870106c1062907a3c5fb1d578f13f53fd Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 1 Aug 2005 02:58:21 +0000 Subject: - tea5767 autodetection fixed. Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/tea5767.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'linux/drivers/media') 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; } -- cgit v1.2.3