summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/tda8290.c
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2007-06-06 15:15:15 -0400
committerMichael Krufky <mkrufky@linuxtv.org>2007-06-06 15:15:15 -0400
commit736bdd192c36a112523f6e85d078cc77d2ea4454 (patch)
treeecd148816065c5a72fbbd61befdda8b2277c0cba /linux/drivers/media/video/tda8290.c
parent0f6dc3a8d369e90d56044af3a4cbd5633fca8cc3 (diff)
downloadmediapointer-dvb-s2-736bdd192c36a112523f6e85d078cc77d2ea4454.tar.gz
mediapointer-dvb-s2-736bdd192c36a112523f6e85d078cc77d2ea4454.tar.bz2
tda8290: store tuning operations in tuner_operations structure
From: Michael Krufky <mkrufky@linuxtv.org> Create static struct tuner_operations tda8290_tuner_ops for tda8290 tuning function callback pointers Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/video/tda8290.c')
-rw-r--r--linux/drivers/media/video/tda8290.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/linux/drivers/media/video/tda8290.c b/linux/drivers/media/video/tda8290.c
index 2efcff638..e0f2b79ab 100644
--- a/linux/drivers/media/video/tda8290.c
+++ b/linux/drivers/media/video/tda8290.c
@@ -607,6 +607,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;
@@ -671,11 +679,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;