diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2007-06-06 15:17:57 -0400 |
---|---|---|
committer | Michael Krufky <mkrufky@linuxtv.org> | 2007-06-06 15:17:57 -0400 |
commit | 0d79963da3174ac0a23ef4f8ae28f8b0ad30e636 (patch) | |
tree | 97f9c657d232df722f9b7fba02cae5c1e91b83bd /linux/drivers/media/video | |
parent | 350c701a74a201bf2d0b2783b7634c52421975e3 (diff) | |
download | mediapointer-dvb-s2-0d79963da3174ac0a23ef4f8ae28f8b0ad30e636.tar.gz mediapointer-dvb-s2-0d79963da3174ac0a23ef4f8ae28f8b0ad30e636.tar.bz2 |
tuner-simple: store tuning operations in tuner_operations structure
From: Michael Krufky <mkrufky@linuxtv.org>
Create static struct tuner_operations simple_tuner_ops
for tuner-simple 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/tuner-simple.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/linux/drivers/media/video/tuner-simple.c b/linux/drivers/media/video/tuner-simple.c index 5a7224353..8cac349fe 100644 --- a/linux/drivers/media/video/tuner-simple.c +++ b/linux/drivers/media/video/tuner-simple.c @@ -515,6 +515,13 @@ static void default_set_radio_freq(struct i2c_client *c, unsigned int freq) tuner_warn("i2c i/o error: rc == %d (should be 4)\n",rc); } +static struct tuner_operations simple_tuner_ops = { + .set_tv_freq = default_set_tv_freq, + .set_radio_freq = default_set_radio_freq, + .has_signal = tuner_signal, + .is_stereo = tuner_stereo, +}; + int default_tuner_init(struct i2c_client *c) { struct tuner *t = i2c_get_clientdata(c); @@ -523,11 +530,7 @@ int default_tuner_init(struct i2c_client *c) t->type, tuners[t->type].name); strlcpy(c->name, tuners[t->type].name, sizeof(c->name)); - t->ops.set_tv_freq = default_set_tv_freq; - t->ops.set_radio_freq = default_set_radio_freq; - t->ops.has_signal = tuner_signal; - t->ops.is_stereo = tuner_stereo; - t->ops.standby = NULL; + memcpy(&t->ops, &simple_tuner_ops, sizeof(struct tuner_operations)); return 0; } |