Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Hartmut Hackmann and committed by
Linus Torvalds
07345f5d 5d5c9904

+13 -12
+13 -12
drivers/media/video/tuner-core.c
··· 362 362 /* TEA5767 autodetection code - only for addr = 0xc0 */ 363 363 if (!no_autodetect) { 364 364 switch (addr) { 365 + case 0x42: 366 + case 0x43: 367 + case 0x4a: 368 + case 0x4b: 369 + /* If chip is not tda8290, don't register. 370 + since it can be tda9887*/ 371 + if (tda8290_probe(&t->i2c) != 0) { 372 + tuner_dbg("chip at addr %x is not a tda8290\n", addr); 373 + kfree(t); 374 + return 0; 375 + } 376 + break; 365 377 case 0x60: 366 378 if (tea5767_autodetection(&t->i2c) != EINVAL) { 367 379 t->type = TUNER_TEA5767; ··· 384 372 385 373 goto register_client; 386 374 } 387 - case 0x42: 388 - case 0x43: 389 - case 0x4a: 390 - case 0x4b: 391 - /* If chip is not tda8290, don't register. 392 - since it can be tda9887*/ 393 - if (tda8290_probe(&t->i2c) != 0) { 394 - kfree(t); 395 - return 0; 396 - } 397 - 375 + break; 398 376 } 399 - 400 377 } 401 378 402 379 /* Initializes only the first adapter found */