diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2007-06-06 15:17:17 -0400 |
---|---|---|
committer | Michael Krufky <mkrufky@linuxtv.org> | 2007-06-06 15:17:17 -0400 |
commit | 350c701a74a201bf2d0b2783b7634c52421975e3 (patch) | |
tree | 6fdf62b694a3a17da25124f0c4243ccdf4eef88d | |
parent | dadf95a01935e4c8a8fe3e26a35c53cfc9cc5c21 (diff) | |
download | mediapointer-dvb-s2-350c701a74a201bf2d0b2783b7634c52421975e3.tar.gz mediapointer-dvb-s2-350c701a74a201bf2d0b2783b7634c52421975e3.tar.bz2 |
tea5767: store tuning operations in tuner_operations structure
From: Michael Krufky <mkrufky@linuxtv.org>
Create static struct tuner_operations tea5767_tuner_ops
for tea5767 tuning function callback pointers
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
-rw-r--r-- | linux/drivers/media/video/tea5767.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/linux/drivers/media/video/tea5767.c b/linux/drivers/media/video/tea5767.c index f912b0eb8..e5c36a19f 100644 --- a/linux/drivers/media/video/tea5767.c +++ b/linux/drivers/media/video/tea5767.c @@ -378,6 +378,14 @@ int tea5767_autodetection(struct i2c_client *c) return 0; } +static struct tuner_operations tea5767_tuner_ops = { + .set_tv_freq = set_tv_freq, + .set_radio_freq = set_radio_freq, + .has_signal = tea5767_signal, + .is_stereo = tea5767_stereo, + .standby = tea5767_standby, +}; + int tea5767_tuner_init(struct i2c_client *c) { struct tuner *t = i2c_get_clientdata(c); @@ -389,11 +397,7 @@ int tea5767_tuner_init(struct i2c_client *c) tuner_info("type set to %d (%s)\n", t->type, "Philips TEA5767HN FM Radio"); strlcpy(c->name, "tea5767", sizeof(c->name)); - t->ops.set_tv_freq = set_tv_freq; - t->ops.set_radio_freq = set_radio_freq; - t->ops.has_signal = tea5767_signal; - t->ops.is_stereo = tea5767_stereo; - t->ops.standby = tea5767_standby; + memcpy(&t->ops, &tea5767_tuner_ops, sizeof(struct tuner_operations)); return (0); } |