aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tea5767.c
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2007-06-06 15:17:17 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-07-18 13:24:05 -0400
commit0f838f8d02415a25358850cc32d36cd72c2a798b (patch)
tree10bd763e2436d3c78a48bd7e6a92001c2273b523 /drivers/media/video/tea5767.c
parente407cd54eecc955b2658106403a294612bf4ed66 (diff)
V4L/DVB (5758): Tea5767: store tuning operations in tuner_operations structure
Create static struct tuner_operations tea5767_tuner_ops for tea5767 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/tea5767.c')
-rw-r--r--drivers/media/video/tea5767.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/media/video/tea5767.c b/drivers/media/video/tea5767.c
index c5510422aa3e..9cce9be718c5 100644
--- a/drivers/media/video/tea5767.c
+++ b/drivers/media/video/tea5767.c
@@ -343,6 +343,14 @@ int tea5767_autodetection(struct i2c_client *c)
343 return 0; 343 return 0;
344} 344}
345 345
346static struct tuner_operations tea5767_tuner_ops = {
347 .set_tv_freq = set_tv_freq,
348 .set_radio_freq = set_radio_freq,
349 .has_signal = tea5767_signal,
350 .is_stereo = tea5767_stereo,
351 .standby = tea5767_standby,
352};
353
346int tea5767_tuner_init(struct i2c_client *c) 354int tea5767_tuner_init(struct i2c_client *c)
347{ 355{
348 struct tuner *t = i2c_get_clientdata(c); 356 struct tuner *t = i2c_get_clientdata(c);
@@ -350,11 +358,7 @@ int tea5767_tuner_init(struct i2c_client *c)
350 tuner_info("type set to %d (%s)\n", t->type, "Philips TEA5767HN FM Radio"); 358 tuner_info("type set to %d (%s)\n", t->type, "Philips TEA5767HN FM Radio");
351 strlcpy(c->name, "tea5767", sizeof(c->name)); 359 strlcpy(c->name, "tea5767", sizeof(c->name));
352 360
353 t->ops.set_tv_freq = set_tv_freq; 361 memcpy(&t->ops, &tea5767_tuner_ops, sizeof(struct tuner_operations));
354 t->ops.set_radio_freq = set_radio_freq;
355 t->ops.has_signal = tea5767_signal;
356 t->ops.is_stereo = tea5767_stereo;
357 t->ops.standby = tea5767_standby;
358 362
359 return (0); 363 return (0);
360} 364}