diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2007-06-06 15:15:48 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-07-18 13:24:04 -0400 |
commit | 9af596ebc7ad3afb0df520b4becad915dd5a5584 (patch) | |
tree | eed5d88d34f0575bc1e4cbc2cbbd523de89aa8fe /drivers/media/video | |
parent | 7fd8b263678ab8430b49c99976ade681f8a78439 (diff) |
V4L/DVB (5756): Tda9887: store tuning operations in tuner_operations structure
Create static struct tuner_operations tda9887_tuner_ops
for tda9887 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')
-rw-r--r-- | drivers/media/video/tda9887.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/media/video/tda9887.c b/drivers/media/video/tda9887.c index 5bb7d19edfbc..caca1092790e 100644 --- a/drivers/media/video/tda9887.c +++ b/drivers/media/video/tda9887.c | |||
@@ -599,6 +599,15 @@ static void tda9887_release(struct i2c_client *c) | |||
599 | t->priv = NULL; | 599 | t->priv = NULL; |
600 | } | 600 | } |
601 | 601 | ||
602 | static struct tuner_operations tda9887_tuner_ops = { | ||
603 | .set_tv_freq = tda9887_set_freq, | ||
604 | .set_radio_freq = tda9887_set_freq, | ||
605 | .standby = tda9887_standby, | ||
606 | .tuner_status = tda9887_tuner_status, | ||
607 | .get_afc = tda9887_get_afc, | ||
608 | .release = tda9887_release, | ||
609 | }; | ||
610 | |||
602 | int tda9887_tuner_init(struct i2c_client *c) | 611 | int tda9887_tuner_init(struct i2c_client *c) |
603 | { | 612 | { |
604 | struct tda9887_priv *priv = NULL; | 613 | struct tda9887_priv *priv = NULL; |
@@ -614,12 +623,7 @@ int tda9887_tuner_init(struct i2c_client *c) | |||
614 | tda9887_info("tda988[5/6/7] found @ 0x%x (%s)\n", t->i2c.addr, | 623 | tda9887_info("tda988[5/6/7] found @ 0x%x (%s)\n", t->i2c.addr, |
615 | t->i2c.driver->driver.name); | 624 | t->i2c.driver->driver.name); |
616 | 625 | ||
617 | t->ops.set_tv_freq = tda9887_set_freq; | 626 | memcpy(&t->ops, &tda9887_tuner_ops, sizeof(struct tuner_operations)); |
618 | t->ops.set_radio_freq = tda9887_set_freq; | ||
619 | t->ops.standby = tda9887_standby; | ||
620 | t->ops.tuner_status = tda9887_tuner_status; | ||
621 | t->ops.get_afc = tda9887_get_afc; | ||
622 | t->ops.release = tda9887_release; | ||
623 | 627 | ||
624 | return 0; | 628 | return 0; |
625 | } | 629 | } |