Parcourir la source

[PATCH] v4l: 848: fixed tda8290 autodetection

- Fixed tda8290 autodetection

Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t.online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Hartmut Hackmann il y a 19 ans
Parent
commit
07345f5d6a
1 fichiers modifiés avec 12 ajouts et 11 suppressions
  1. 12 11
      drivers/media/video/tuner-core.c

+ 12 - 11
drivers/media/video/tuner-core.c

@@ -362,16 +362,6 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind)
 	/* TEA5767 autodetection code - only for addr = 0xc0 */
 	/* TEA5767 autodetection code - only for addr = 0xc0 */
 	if (!no_autodetect) {
 	if (!no_autodetect) {
 		switch (addr) {
 		switch (addr) {
-		case 0x60:
-			if (tea5767_autodetection(&t->i2c) != EINVAL) {
-				t->type = TUNER_TEA5767;
-				t->mode_mask = T_RADIO;
-				t->mode = T_STANDBY;
-				t->freq = 87.5 * 16; /* Sets freq to FM range */
-				default_mode_mask &= ~T_RADIO;
-
-				goto register_client;
-			}
 		case 0x42:
 		case 0x42:
 		case 0x43:
 		case 0x43:
 		case 0x4a:
 		case 0x4a:
@@ -379,12 +369,23 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind)
 			/* If chip is not tda8290, don't register.
 			/* If chip is not tda8290, don't register.
 			   since it can be tda9887*/
 			   since it can be tda9887*/
 			if (tda8290_probe(&t->i2c) != 0) {
 			if (tda8290_probe(&t->i2c) != 0) {
+                        	tuner_dbg("chip at addr %x is not a tda8290\n", addr);
 				kfree(t);
 				kfree(t);
 				return 0;
 				return 0;
 			}
 			}
+			break;
+		case 0x60:
+			if (tea5767_autodetection(&t->i2c) != EINVAL) {
+				t->type = TUNER_TEA5767;
+				t->mode_mask = T_RADIO;
+				t->mode = T_STANDBY;
+				t->freq = 87.5 * 16; /* Sets freq to FM range */
+				default_mode_mask &= ~T_RADIO;
 
 
+				goto register_client;
+			}
+			break;
 		}
 		}
-
 	}
 	}
 
 
 	/* Initializes only the first adapter found */
 	/* Initializes only the first adapter found */