summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <devnull@localhost>2005-07-01 15:02:09 +0000
committerMauro Carvalho Chehab <devnull@localhost>2005-07-01 15:02:09 +0000
commit669535fb595eaa3d2d159fc0b3531cb770ebeafd (patch)
tree066e1c092b2eb9479b9c5ca5da5bb676b20efb61
parent2a07da4812a2b8039516a29d30ac1d3c09a9ac36 (diff)
downloadmediapointer-dvb-s2-669535fb595eaa3d2d159fc0b3531cb770ebeafd.tar.gz
mediapointer-dvb-s2-669535fb595eaa3d2d159fc0b3531cb770ebeafd.tar.bz2
* tuner-core.c:
- new debug info; - reincluded type=t->type when I2C is not yet registred. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
-rw-r--r--linux/drivers/media/video/tuner-core.c14
-rw-r--r--v4l/ChangeLog8
2 files changed, 19 insertions, 3 deletions
diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c
index ee6249263..3b85b442f 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.37 2005/07/01 12:13:09 mchehab Exp $
+ * $Id: tuner-core.c,v 1.38 2005/07/01 15:02:09 mchehab Exp $
*
* i2c tv tuner chip device driver
* core core, i.e. kernel interfaces, registering and so on
@@ -146,12 +146,19 @@ static void set_type(struct i2c_client *c, unsigned int type,
unsigned char buffer[4];
/* sanity check */
- if (type == UNSET || type == TUNER_ABSENT)
+ if (type == UNSET || type == TUNER_ABSENT) {
+ dprintk("tuner 0x%02x: Tuner type absent\n",c->addr);
return;
- if (type >= tuner_count)
+ }
+
+ if (type >= tuner_count) {
+ dprintk("tuner 0x%02x: Tuner count greater than %d\n",c->addr,tuner_count);
return;
+ }
if (NULL == t->i2c.dev.driver) {
+ dprintk("tuner 0x%02x: I2C driver not registred yet!\n",c->addr);
+ t->type=type;
/* not registered yet */
return;
}
@@ -325,6 +332,7 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind)
t->audmode = V4L2_TUNER_MODE_STEREO;
t->admin_status = T_UNINITIALIZED;
+
tuner_info("chip found @ 0x%x (%s)\n", addr << 1, adap->name);
/* TEA5767 autodetection code - only for addr = 0xc0 */
diff --git a/v4l/ChangeLog b/v4l/ChangeLog
index daca21990..daf8047b6 100644
--- a/v4l/ChangeLog
+++ b/v4l/ChangeLog
@@ -1,6 +1,14 @@
2005-06-01 12:09 mchehab
* tuner-core.c:
+ - new debug info;
+ - reincluded type=t->type when I2C is not yet registred.
+
+ Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
+
+2005-06-01 12:09 mchehab
+ * tuner-core.c:
+
- Fixed a race condition at I2C implementation.
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>