]> err.no Git - linux-2.6/blobdiff - drivers/media/video/tuner-core.c
V4L/DVB (6840): tuner: convert tda9887 to use TUNER_SET_CONFIG
[linux-2.6] / drivers / media / video / tuner-core.c
index 9134b997ef239bc0e12b755a063b91c4c3f8d157..695f39ebe77ba8416b3a86211de0ea940f2fef40 100644 (file)
@@ -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 --- */