aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHartmut Hackmann <hartmut.hackmann@t.online.de>2005-11-09 00:38:09 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-09 10:56:24 -0500
commit07345f5d6a92bc1184ca8b05069ec1cd3514fe11 (patch)
tree57634bbaa35cc0e8f0dc8fe72b8860c65a225343
parent5d5c9904e56ae39ff71b86dc5046e24601bff00f (diff)
[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>
-rw-r--r--drivers/media/video/tuner-core.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
index 6fd59be19182..77d25cc9cdbe 100644
--- a/drivers/media/video/tuner-core.c
+++ b/drivers/media/video/tuner-core.c
@@ -362,16 +362,6 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind)
362 /* TEA5767 autodetection code - only for addr = 0xc0 */ 362 /* TEA5767 autodetection code - only for addr = 0xc0 */
363 if (!no_autodetect) { 363 if (!no_autodetect) {
364 switch (addr) { 364 switch (addr) {
365 case 0x60:
366 if (tea5767_autodetection(&t->i2c) != EINVAL) {
367 t->type = TUNER_TEA5767;
368 t->mode_mask = T_RADIO;
369 t->mode = T_STANDBY;
370 t->freq = 87.5 * 16; /* Sets freq to FM range */
371 default_mode_mask &= ~T_RADIO;
372
373 goto register_client;
374 }
375 case 0x42: 365 case 0x42:
376 case 0x43: 366 case 0x43:
377 case 0x4a: 367 case 0x4a:
@@ -379,12 +369,23 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind)
379 /* If chip is not tda8290, don't register. 369 /* If chip is not tda8290, don't register.
380 since it can be tda9887*/ 370 since it can be tda9887*/
381 if (tda8290_probe(&t->i2c) != 0) { 371 if (tda8290_probe(&t->i2c) != 0) {
372 tuner_dbg("chip at addr %x is not a tda8290\n", addr);
382 kfree(t); 373 kfree(t);
383 return 0; 374 return 0;
384 } 375 }
376 break;
377 case 0x60:
378 if (tea5767_autodetection(&t->i2c) != EINVAL) {
379 t->type = TUNER_TEA5767;
380 t->mode_mask = T_RADIO;
381 t->mode = T_STANDBY;
382 t->freq = 87.5 * 16; /* Sets freq to FM range */
383 default_mode_mask &= ~T_RADIO;
385 384
385 goto register_client;
386 }
387 break;
386 } 388 }
387
388 } 389 }
389 390
390 /* Initializes only the first adapter found */ 391 /* Initializes only the first adapter found */