diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2007-06-06 15:15:15 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-07-18 13:24:04 -0400 |
commit | 7fd8b263678ab8430b49c99976ade681f8a78439 (patch) | |
tree | 383c4f68a46717fdc9d6db5f8c6c15c642a9b426 | |
parent | c22bcb07ad4555fe7ac4ce724c8ad1de889f9477 (diff) |
V4L/DVB (5755): Tda8290: store tuning operations in tuner_operations structure
Create static struct tuner_operations tda8290_tuner_ops
for tda8290 tuning function callback pointers
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r-- | drivers/media/video/tda8290.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/media/video/tda8290.c b/drivers/media/video/tda8290.c index 99122ff4e81c..9c1b64c51c02 100644 --- a/drivers/media/video/tda8290.c +++ b/drivers/media/video/tda8290.c | |||
@@ -603,6 +603,14 @@ static void tda8290_release(struct i2c_client *c) | |||
603 | t->priv = NULL; | 603 | t->priv = NULL; |
604 | } | 604 | } |
605 | 605 | ||
606 | static struct tuner_operations tda8290_tuner_ops = { | ||
607 | .set_tv_freq = set_tv_freq, | ||
608 | .set_radio_freq = set_radio_freq, | ||
609 | .has_signal = has_signal, | ||
610 | .standby = standby, | ||
611 | .release = tda8290_release, | ||
612 | }; | ||
613 | |||
606 | int tda8290_init(struct i2c_client *c) | 614 | int tda8290_init(struct i2c_client *c) |
607 | { | 615 | { |
608 | struct tda8290_priv *priv = NULL; | 616 | struct tda8290_priv *priv = NULL; |
@@ -667,11 +675,8 @@ int tda8290_init(struct i2c_client *c) | |||
667 | } | 675 | } |
668 | tuner_info("type set to %s\n", c->name); | 676 | tuner_info("type set to %s\n", c->name); |
669 | 677 | ||
670 | t->ops.set_tv_freq = set_tv_freq; | 678 | memcpy(&t->ops, &tda8290_tuner_ops, sizeof(struct tuner_operations)); |
671 | t->ops.set_radio_freq = set_radio_freq; | 679 | |
672 | t->ops.has_signal = has_signal; | ||
673 | t->ops.standby = standby; | ||
674 | t->ops.release = tda8290_release; | ||
675 | priv->tda827x_lpsel = 0; | 680 | priv->tda827x_lpsel = 0; |
676 | t->mode = V4L2_TUNER_ANALOG_TV; | 681 | t->mode = V4L2_TUNER_ANALOG_TV; |
677 | 682 | ||