summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <devnull@localhost>2005-10-19 14:21:57 +0000
committerMauro Carvalho Chehab <devnull@localhost>2005-10-19 14:21:57 +0000
commit70ce3008a2aaf2ba66b48107241c913010e9d4dd (patch)
treebe7660c517a446e10db80c3e876db11c1eb994ee
parent68364c87034714209f085035039dd906a5219e02 (diff)
downloadmediapointer-dvb-s2-70ce3008a2aaf2ba66b48107241c913010e9d4dd.tar.gz
mediapointer-dvb-s2-70ce3008a2aaf2ba66b48107241c913010e9d4dd.tar.bz2
- Rearranged print order to present a correct answer.
- Some cleanups at tuner_attach function. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
-rw-r--r--linux/drivers/media/video/tuner-core.c15
-rw-r--r--v4l/ChangeLog8
2 files changed, 15 insertions, 8 deletions
diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c
index 2b6e9f494..6f2f20fe4 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.77 2005/10/18 23:34:22 hhackmann Exp $
+ * $Id: tuner-core.c,v 1.78 2005/10/19 14:21:57 mchehab Exp $
*
* i2c tv tuner chip device driver
* core core, i.e. kernel interfaces, registering and so on
@@ -359,16 +359,13 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind)
t->audmode = V4L2_TUNER_MODE_STEREO;
t->mode_mask = T_UNINITIALIZED;
-
- tuner_info("chip found @ 0x%x (%s)\n", addr << 1, adap->name);
-
if (show_i2c) {
unsigned char buffer[16];
int i,rc;
memset(buffer, 0, sizeof(buffer));
rc = i2c_master_recv(&t->i2c, buffer, sizeof(buffer));
- printk("tuner-%04x I2C RECV = ",addr);
+ tuner_info("I2C RECV = ");
for (i=0;i<rc;i++)
printk("%02x ",buffer[i]);
printk("\n");
@@ -384,14 +381,14 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind)
t->freq = 87.5 * 16; /* Sets freq to FM range */
default_mode_mask &= ~T_RADIO;
- i2c_attach_client (&t->i2c);
- set_type(&t->i2c,t->type, t->mode_mask);
- return 0;
+ goto register_client;
}
case 0x42:
case 0x43:
case 0x4a:
case 0x4b:
+ /* If chip is not tda8290, don't register.
+ since it can be tda9887*/
if (tda8290_probe(&t->i2c) != 0) {
kfree(t);
return 0;
@@ -410,6 +407,8 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind)
}
/* Should be just before return */
+register_client:
+ tuner_info("chip found @ 0x%x (%s)\n", addr << 1, adap->name);
i2c_attach_client (&t->i2c);
set_type (&t->i2c,t->type, t->mode_mask);
return 0;
diff --git a/v4l/ChangeLog b/v4l/ChangeLog
index 9f920c2b1..1aa91a040 100644
--- a/v4l/ChangeLog
+++ b/v4l/ChangeLog
@@ -1,3 +1,11 @@
+2005-10-19 14:19 mchehab
+
+ * ../linux/drivers/media/video/tuner-core.c: (tuner_attach):
+ - Rearranged print order to present a correct answer.
+ - Some cleanups at tuner_attach function.
+
+ Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
+
2005-10-19 13:47 mchehab
* ../linux/include/linux/videodev2.h: