summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/tuner-core.c
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2007-12-16 17:53:32 -0500
committerMichael Krufky <mkrufky@linuxtv.org>2007-12-16 17:53:32 -0500
commite204914b6924b0eda3d4a8adbe8334c5ed27d457 (patch)
tree1dcc04a5b03f45c2ff1369fe078ceb94bfa2f5d6 /linux/drivers/media/video/tuner-core.c
parent72459008a1643c4804ee6688426d7c29a66a545b (diff)
downloadmediapointer-dvb-s2-e204914b6924b0eda3d4a8adbe8334c5ed27d457.tar.gz
mediapointer-dvb-s2-e204914b6924b0eda3d4a8adbe8334c5ed27d457.tar.bz2
tuner: convert tda9887 to use TUNER_SET_CONFIG
From: Michael Krufky <mkrufky@linuxtv.org> 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>
Diffstat (limited to 'linux/drivers/media/video/tuner-core.c')
-rw-r--r--linux/drivers/media/video/tuner-core.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c
index 47aafed34..5b5a38eaf 100644
--- a/linux/drivers/media/video/tuner-core.c
+++ b/linux/drivers/media/video/tuner-core.c
@@ -877,25 +877,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 --- */