V4L/DVB (6786): tuner: add struct analog_demod_info to struct analog_tuner_ops

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <git-commits-head@...>
Date: Friday, January 25, 2008 - 7:09 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a55db8...
Commit:     a55db8cd7f8a107f3abcb4c803b1873b2be63663
Parent:     ab1660503ac3af7febfcf987648509b484d4feda
Author:     Michael Krufky <mkrufky@linuxtv.org>
AuthorDate: Sun Dec 9 13:52:51 2007 -0300
Committer:  Mauro Carvalho Chehab <mchehab@infradead.org>
CommitDate: Fri Jan 25 19:03:28 2008 -0200

    V4L/DVB (6786): tuner: add struct analog_demod_info to struct analog_tuner_ops
    
    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      |    6 ++++++
 drivers/media/video/tda9887.c      |    3 +++
 drivers/media/video/tuner-core.c   |    3 +++
 drivers/media/video/tuner-driver.h |    7 +++++++
 4 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/tda8290.c b/drivers/media/video/tda8290.c
index d0d13bc..403f96f 100644
--- a/drivers/media/video/tda8290.c
+++ b/drivers/media/video/tda8290.c
@@ -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,
diff --git a/drivers/media/video/tda9887.c b/drivers/media/video/tda9887.c
index 98d45c4..8a95f09 100644
--- a/drivers/media/video/tda9887.c
+++ b/drivers/media/video/tda9887.c
@@ -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,
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
index 0cc1907..59e67c9 100644
--- a/drivers/media/video/tuner-core.c
+++ b/drivers/media/video/tuner-core.c
@@ -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);
diff --git a/drivers/media/video/tuner-driver.h b/drivers/media/video/tuner-driver.h
index a215161..c245f50 100644
--- a/drivers/media/video/tuner-driver.h
+++ b/drivers/media/video/tuner-driver.h
@@ -28,7 +28,14 @@
 
 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);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
V4L/DVB (6786): tuner: add struct analog_demod_info to struc..., Linux Kernel Mailing List..., (Fri Jan 25, 7:09 pm)