From e407cd54eecc955b2658106403a294612bf4ed66 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Wed, 6 Jun 2007 16:16:29 -0300 Subject: 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 Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/tea5761.c | 12 ++++++++---- 1 file 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) 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); @@ -229,10 +236,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); } -- cgit v1.2.3