diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2007-06-06 15:16:29 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-07-18 13:24:05 -0400 |
commit | e407cd54eecc955b2658106403a294612bf4ed66 (patch) | |
tree | 0f188b2e4d31b5a3beaecb755b8e3a466918a5b3 /drivers/media/video/tea5761.c | |
parent | 9af596ebc7ad3afb0df520b4becad915dd5a5584 (diff) |
V4L/DVB (5757): Tea5761: store tuning operations in tuner_operations structure
Create static struct tuner_operations tea5761_tuner_ops
for tea5761 tuning function callback pointers
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/tea5761.c')
-rw-r--r-- | drivers/media/video/tea5761.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/media/video/tea5761.c b/drivers/media/video/tea5761.c index 858f2d11496c..2fcb81d4d0dd 100644 --- a/drivers/media/video/tea5761.c +++ b/drivers/media/video/tea5761.c | |||
@@ -219,6 +219,13 @@ int tea5761_autodetection(struct i2c_client *c) | |||
219 | return 0; | 219 | return 0; |
220 | } | 220 | } |
221 | 221 | ||
222 | static struct tuner_operations tea5761_tuner_ops = { | ||
223 | .set_tv_freq = set_tv_freq, | ||
224 | .set_radio_freq = set_radio_freq, | ||
225 | .has_signal = tea5761_signal, | ||
226 | .is_stereo = tea5761_stereo, | ||
227 | }; | ||
228 | |||
222 | int tea5761_tuner_init(struct i2c_client *c) | 229 | int tea5761_tuner_init(struct i2c_client *c) |
223 | { | 230 | { |
224 | struct tuner *t = i2c_get_clientdata(c); | 231 | struct tuner *t = i2c_get_clientdata(c); |
@@ -229,10 +236,7 @@ int tea5761_tuner_init(struct i2c_client *c) | |||
229 | tuner_info("type set to %d (%s)\n", t->type, "Philips TEA5761HN FM Radio"); | 236 | tuner_info("type set to %d (%s)\n", t->type, "Philips TEA5761HN FM Radio"); |
230 | strlcpy(c->name, "tea5761", sizeof(c->name)); | 237 | strlcpy(c->name, "tea5761", sizeof(c->name)); |
231 | 238 | ||
232 | t->ops.set_tv_freq = set_tv_freq; | 239 | memcpy(&t->ops, &tea5761_tuner_ops, sizeof(struct tuner_operations)); |
233 | t->ops.set_radio_freq = set_radio_freq; | ||
234 | t->ops.has_signal = tea5761_signal; | ||
235 | t->ops.is_stereo = tea5761_stereo; | ||
236 | 240 | ||
237 | return (0); | 241 | return (0); |
238 | } | 242 | } |