aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2007-12-16 17:27:23 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-01-25 16:03:53 -0500
commitf1c9a281005f714fdc57c830a23f2b6bd6e2b714 (patch)
treed19aa603da62609bd8277ee71ae28adbbbeefbd7
parentdaae58956bebeab6631ba078669970a27bdfbdbe (diff)
V4L/DVB (6839): tuner: add set_config to struct analog_tuner_ops
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r--drivers/media/video/tuner-core.c14
-rw-r--r--drivers/media/video/tuner-driver.h3
2 files changed, 17 insertions, 0 deletions
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
index 355f9810fac..9134b997ef2 100644
--- a/drivers/media/video/tuner-core.c
+++ b/drivers/media/video/tuner-core.c
@@ -154,6 +154,19 @@ static int fe_has_signal(struct dvb_frontend *fe)
154 return strength; 154 return strength;
155} 155}
156 156
157static int fe_set_config(struct dvb_frontend *fe, void *priv_cfg)
158{
159 struct dvb_tuner_ops *fe_tuner_ops = &fe->ops.tuner_ops;
160 struct tuner *t = fe->analog_demod_priv;
161
162 if (fe_tuner_ops->set_config)
163 return fe_tuner_ops->set_config(fe, priv_cfg);
164
165 tuner_warn("Tuner frontend module has no way to set config\n");
166
167 return 0;
168}
169
157static void tuner_status(struct dvb_frontend *fe); 170static void tuner_status(struct dvb_frontend *fe);
158 171
159static struct analog_tuner_ops tuner_core_ops = { 172static struct analog_tuner_ops tuner_core_ops = {
@@ -161,6 +174,7 @@ static struct analog_tuner_ops tuner_core_ops = {
161 .standby = fe_standby, 174 .standby = fe_standby,
162 .release = fe_release, 175 .release = fe_release,
163 .has_signal = fe_has_signal, 176 .has_signal = fe_has_signal,
177 .set_config = fe_set_config,
164 .tuner_status = tuner_status 178 .tuner_status = tuner_status
165}; 179};
166 180
diff --git a/drivers/media/video/tuner-driver.h b/drivers/media/video/tuner-driver.h
index 65ced435018..7f43dc68ab2 100644
--- a/drivers/media/video/tuner-driver.h
+++ b/drivers/media/video/tuner-driver.h
@@ -45,6 +45,9 @@ struct analog_tuner_ops {
45 void (*standby)(struct dvb_frontend *fe); 45 void (*standby)(struct dvb_frontend *fe);
46 void (*release)(struct dvb_frontend *fe); 46 void (*release)(struct dvb_frontend *fe);
47 int (*i2c_gate_ctrl)(struct dvb_frontend *fe, int enable); 47 int (*i2c_gate_ctrl)(struct dvb_frontend *fe, int enable);
48
49 /** This is to allow setting tuner-specific configuration */
50 int (*set_config)(struct dvb_frontend *fe, void *priv_cfg);
48}; 51};
49 52
50struct tuner { 53struct tuner {