diff options
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/video/tea5767.c | 6 | ||||
-rw-r--r-- | linux/drivers/media/video/tuner-core.c | 7 |
2 files changed, 6 insertions, 7 deletions
diff --git a/linux/drivers/media/video/tea5767.c b/linux/drivers/media/video/tea5767.c index e4a46ffc2..df2cb9ed9 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.13 2005/06/30 09:45:18 mchehab Exp $ + * $Id: tea5767.c,v 1.14 2005/06/30 16:37:17 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 @@ -305,7 +305,7 @@ static int tea5767_stereo(struct i2c_client *c) return ((buffer[2] & TEA5767_STEREO_MASK) ? V4L2_TUNER_SUB_STEREO : 0); } -int tea_detection(struct i2c_client *c) +int tea5767_autodetection(struct i2c_client *c) { unsigned char buffer[5] = { 0xff, 0xff, 0xff, 0xff, 0xff }; int rc; @@ -341,7 +341,7 @@ int tea5767_tuner_init(struct i2c_client *c) { struct tuner *t = i2c_get_clientdata(c); - if (tea_detection(c) == EINVAL) + if (tea5767_autodetection(c) == EINVAL) return EINVAL; tuner_info("type set to %d (%s)\n", t->type, TEA5767_TUNER_NAME); 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; |