diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2007-12-16 19:53:32 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-25 19:03:54 -0200 |
commit | 710401b837f8849dc9c28385eb5298746b811305 (patch) | |
tree | 25a556fa0f840a5d115abefac344181fd2caea00 /drivers/media/video/tuner-core.c | |
parent | f1c9a281005f714fdc57c830a23f2b6bd6e2b714 (diff) | |
download | lwn-710401b837f8849dc9c28385eb5298746b811305.tar.gz lwn-710401b837f8849dc9c28385eb5298746b811305.zip |
V4L/DVB (6840): tuner: convert tda9887 to use TUNER_SET_CONFIG
Use TUNER_SET_CONFIG to set configuration in tda9887's private state
structure, rather than storing tda9887-specific configuration within
struct tuner.
Update handling of TUNER_SET_CONFIG by tuner-core, to call
&t->fe.ops.analog_demod_ops rather than &t->fe.ops.tuner_ops
analog_demod_ops.set_config passes the request to tuner_ops.set_config,
so this does not break other drivers.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/tuner-core.c')
-rw-r--r-- | drivers/media/video/tuner-core.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index 9134b997ef23..695f39ebe77b 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c @@ -833,25 +833,19 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) #endif case TUNER_SET_CONFIG: { - struct dvb_tuner_ops *fe_tuner_ops = &t->fe.ops.tuner_ops; + struct analog_tuner_ops *ops = t->fe.ops.analog_demod_ops; struct v4l2_priv_tun_config *cfg = arg; if (t->type != cfg->tuner) break; - if (t->type == TUNER_TDA9887) { - t->tda9887_config = *(unsigned int *)cfg->priv; - set_freq(client, t->tv_freq); - break; - } - - if (NULL == fe_tuner_ops->set_config) { + if ((NULL == ops) || (NULL == ops->set_config)) { tuner_warn("Tuner frontend module has no way to " "set config\n"); break; } - fe_tuner_ops->set_config(&t->fe, cfg->priv); + ops->set_config(&t->fe, cfg->priv); break; } /* --- v4l ioctls --- */ |