diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2007-06-06 15:16:29 -0400 |
---|---|---|
committer | Michael Krufky <mkrufky@linuxtv.org> | 2007-06-06 15:16:29 -0400 |
commit | dadf95a01935e4c8a8fe3e26a35c53cfc9cc5c21 (patch) | |
tree | 332014a53739606e668d00147562cab75efe0128 /linux/drivers/media/video/tea5761.c | |
parent | 4383210b10a7e379d44522771271367cee3d3bce (diff) | |
download | mediapointer-dvb-s2-dadf95a01935e4c8a8fe3e26a35c53cfc9cc5c21.tar.gz mediapointer-dvb-s2-dadf95a01935e4c8a8fe3e26a35c53cfc9cc5c21.tar.bz2 |
tea5761: store tuning operations in tuner_operations structure
From: Michael Krufky <mkrufky@linuxtv.org>
Create static struct tuner_operations tea5761_tuner_ops
for tea5761 tuning function callback pointers
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/video/tea5761.c')
-rw-r--r-- | linux/drivers/media/video/tea5761.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/linux/drivers/media/video/tea5761.c b/linux/drivers/media/video/tea5761.c index ed8b23649..5c10287ab 100644 --- a/linux/drivers/media/video/tea5761.c +++ b/linux/drivers/media/video/tea5761.c @@ -220,6 +220,13 @@ int tea5761_autodetection(struct i2c_client *c) return 0; } +static struct tuner_operations tea5761_tuner_ops = { + .set_tv_freq = set_tv_freq, + .set_radio_freq = set_radio_freq, + .has_signal = tea5761_signal, + .is_stereo = tea5761_stereo, +}; + int tea5761_tuner_init(struct i2c_client *c) { struct tuner *t = i2c_get_clientdata(c); @@ -230,10 +237,7 @@ int tea5761_tuner_init(struct i2c_client *c) tuner_info("type set to %d (%s)\n", t->type, "Philips TEA5761HN FM Radio"); strlcpy(c->name, "tea5761", sizeof(c->name)); - t->ops.set_tv_freq = set_tv_freq; - t->ops.set_radio_freq = set_radio_freq; - t->ops.has_signal = tea5761_signal; - t->ops.is_stereo = tea5761_stereo; + memcpy(&t->ops, &tea5761_tuner_ops, sizeof(struct tuner_operations)); return (0); } |