summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/tuner-core.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <devnull@localhost>2005-06-30 16:37:17 +0000
committerMauro Carvalho Chehab <devnull@localhost>2005-06-30 16:37:17 +0000
commit1d6b912020482abd6eb163baa0190a1da23b9f9e (patch)
tree5e41cca3a10483e9fa925a0bb174b0d7bd7e3773 /linux/drivers/media/video/tuner-core.c
parent29c59c47dfb646d340182b3500486b144ae7c1b7 (diff)
downloadmediapointer-dvb-s2-1d6b912020482abd6eb163baa0190a1da23b9f9e.tar.gz
mediapointer-dvb-s2-1d6b912020482abd6eb163baa0190a1da23b9f9e.tar.bz2
- Fixed bugs at TEA5767 autodetection code
- New debug code for identifying calls to set_type before I2C ok. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'linux/drivers/media/video/tuner-core.c')
-rw-r--r--linux/drivers/media/video/tuner-core.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c
index 74f216dd6..072252311 100644
--- a/linux/drivers/media/video/tuner-core.c
+++ b/linux/drivers/media/video/tuner-core.c
@@ -1,5 +1,5 @@
/*
- * $Id: tuner-core.c,v 1.32 2005/06/30 09:45:18 mchehab Exp $
+ * $Id: tuner-core.c,v 1.33 2005/06/30 16:37:17 mchehab Exp $
*
* i2c tv tuner chip device driver
* core core, i.e. kernel interfaces, registering and so on
@@ -152,8 +152,8 @@ static void set_type(struct i2c_client *c, unsigned int type,
return;
if (NULL == t->i2c.dev.driver) {
+ tuner_info("Trying to set type before initializing driver\n");
/* not registered yet */
- t->type = type;
return;
}
/* if ((t->admin_status==T_UNINITIALIZED) && (t->type == type))
@@ -312,8 +312,7 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind)
/* TEA5767 autodetection code - only for addr = 0xc0 */
if (addr == 0x60) {
- set_type(&t->i2c, TUNER_TEA5767, T_RADIO);
- if (t->type == TUNER_TEA5767) {
+ if (tea5767_autodetection(&t->i2c)!=EINVAL) {
t->type = TUNER_TEA5767;
t->admin_status = T_RADIO|T_STANDBY;
default_admin_status &= ~T_RADIO;