summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2007-06-06 15:15:48 -0400
committerMichael Krufky <mkrufky@linuxtv.org>2007-06-06 15:15:48 -0400
commit4383210b10a7e379d44522771271367cee3d3bce (patch)
treebdf30f3e2c8192500f404df30063be74e65ace4c /linux/drivers/media/video
parent736bdd192c36a112523f6e85d078cc77d2ea4454 (diff)
downloadmediapointer-dvb-s2-4383210b10a7e379d44522771271367cee3d3bce.tar.gz
mediapointer-dvb-s2-4383210b10a7e379d44522771271367cee3d3bce.tar.bz2
tda9887: store tuning operations in tuner_operations structure
From: Michael Krufky <mkrufky@linuxtv.org> Create static struct tuner_operations tda9887_tuner_ops for tda9887 tuning function callback pointers Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r--linux/drivers/media/video/tda9887.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/linux/drivers/media/video/tda9887.c b/linux/drivers/media/video/tda9887.c
index cb4864098..6ff82ff2d 100644
--- a/linux/drivers/media/video/tda9887.c
+++ b/linux/drivers/media/video/tda9887.c
@@ -610,6 +610,15 @@ static void tda9887_release(struct i2c_client *c)
t->priv = NULL;
}
+static struct tuner_operations tda9887_tuner_ops = {
+ .set_tv_freq = tda9887_set_freq,
+ .set_radio_freq = tda9887_set_freq,
+ .standby = tda9887_standby,
+ .tuner_status = tda9887_tuner_status,
+ .get_afc = tda9887_get_afc,
+ .release = tda9887_release,
+};
+
int tda9887_tuner_init(struct i2c_client *c)
{
struct tda9887_priv *priv = NULL;
@@ -625,12 +634,7 @@ int tda9887_tuner_init(struct i2c_client *c)
tda9887_info("tda988[5/6/7] found @ 0x%x (%s)\n", t->i2c.addr,
t->i2c.driver->driver.name);
- t->ops.set_tv_freq = tda9887_set_freq;
- t->ops.set_radio_freq = tda9887_set_freq;
- t->ops.standby = tda9887_standby;
- t->ops.tuner_status = tda9887_tuner_status;
- t->ops.get_afc = tda9887_get_afc;
- t->ops.release = tda9887_release;
+ memcpy(&t->ops, &tda9887_tuner_ops, sizeof(struct tuner_operations));
return 0;
}