]> err.no Git - linux-2.6/commitdiff
V4L/DVB (6786): tuner: add struct analog_demod_info to struct analog_tuner_ops
authorMichael Krufky <mkrufky@linuxtv.org>
Sun, 9 Dec 2007 16:52:51 +0000 (13:52 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Fri, 25 Jan 2008 21:03:28 +0000 (19:03 -0200)
Store the analog demodulator name in fe.ops.analog_demod_ops.info.name

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/tda8290.c
drivers/media/video/tda9887.c
drivers/media/video/tuner-core.c
drivers/media/video/tuner-driver.h

index d0d13bc6125097fecf100d612eedbbc13d5fee2a..403f96f998ec349e7bedaffefda95fe0cfd317b9 100644 (file)
@@ -636,6 +636,9 @@ static int tda8295_probe(struct tuner_i2c_props *i2c_props)
 }
 
 static struct analog_tuner_ops tda8290_tuner_ops = {
+       .info           = {
+               .name   = "TDA8290",
+       },
        .set_params     = tda8290_set_params,
        .has_signal     = tda8290_has_signal,
        .standby        = tda8290_standby,
@@ -644,6 +647,9 @@ static struct analog_tuner_ops tda8290_tuner_ops = {
 };
 
 static struct analog_tuner_ops tda8295_tuner_ops = {
+       .info           = {
+               .name   = "TDA8295",
+       },
        .set_params     = tda8295_set_params,
        .has_signal     = tda8295_has_signal,
        .standby        = tda8295_standby,
index 98d45c4912bd0514a28785ee963f795957f55383..8a95f097ba23761279460652387cf0b46d5528d8 100644 (file)
@@ -636,6 +636,9 @@ static void tda9887_release(struct dvb_frontend *fe)
 }
 
 static struct analog_tuner_ops tda9887_tuner_ops = {
+       .info           = {
+               .name   = "TDA9887",
+       },
        .set_params     = tda9887_set_params,
        .standby        = tda9887_standby,
        .tuner_status   = tda9887_tuner_status,
index 0cc190761e242f41ddc8cfdad0ed5603791eab32..59e67c92575839b8ef3030f635d447be40a41cdc 100644 (file)
@@ -410,6 +410,9 @@ static void set_type(struct i2c_client *c, unsigned int type,
 
                t->fe.ops.analog_demod_ops = &tuner_core_ops;
                t->fe.analog_demod_priv = t;
+       } else {
+               strlcpy(t->i2c->name, ops->info.name,
+                       sizeof(t->i2c->name));
        }
 
        tuner_dbg("type set to %s\n", t->i2c->name);
index a215161d02411ae8d2f7b6d791c12cb8526cafae..c245f501a319442b45242cd4ef06520a4037b2e3 100644 (file)
 
 extern unsigned const int tuner_count;
 
+struct analog_demod_info {
+       char name[128];
+};
+
 struct analog_tuner_ops {
+
+       struct analog_demod_info info;
+
        void (*set_params)(struct dvb_frontend *fe,
                           struct analog_parameters *params);
        int  (*has_signal)(struct dvb_frontend *fe);