V4L/DVB (5755): Tda8290: store tuning operations in tuner_operations structure
authorMichael Krufky <mkrufky@linuxtv.org>
Wed, 6 Jun 2007 19:15:15 +0000 (16:15 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Wed, 18 Jul 2007 17:24:04 +0000 (14:24 -0300)
Create static struct tuner_operations tda8290_tuner_ops
for tda8290 tuning function callback pointers

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/tda8290.c

index 99122ff4e81cb294d34370812f91abf4f936770c..9c1b64c51c028519fa9a25b8f624c59b8d00c9aa 100644 (file)
@@ -603,6 +603,14 @@ static void tda8290_release(struct i2c_client *c)
        t->priv = NULL;
 }
 
+static struct tuner_operations tda8290_tuner_ops = {
+       .set_tv_freq    = set_tv_freq,
+       .set_radio_freq = set_radio_freq,
+       .has_signal     = has_signal,
+       .standby        = standby,
+       .release        = tda8290_release,
+};
+
 int tda8290_init(struct i2c_client *c)
 {
        struct tda8290_priv *priv = NULL;
@@ -667,11 +675,8 @@ int tda8290_init(struct i2c_client *c)
        }
        tuner_info("type set to %s\n", c->name);
 
-       t->ops.set_tv_freq    = set_tv_freq;
-       t->ops.set_radio_freq = set_radio_freq;
-       t->ops.has_signal = has_signal;
-       t->ops.standby = standby;
-       t->ops.release = tda8290_release;
+       memcpy(&t->ops, &tda8290_tuner_ops, sizeof(struct tuner_operations));
+
        priv->tda827x_lpsel = 0;
        t->mode = V4L2_TUNER_ANALOG_TV;