aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/ttpci/budget.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb/ttpci/budget.c')
-rw-r--r--drivers/media/dvb/ttpci/budget.c47
1 files changed, 31 insertions, 16 deletions
diff --git a/drivers/media/dvb/ttpci/budget.c b/drivers/media/dvb/ttpci/budget.c
index 1500210c06cf..874a10a9d493 100644
--- a/drivers/media/dvb/ttpci/budget.c
+++ b/drivers/media/dvb/ttpci/budget.c
@@ -442,6 +442,7 @@ static struct stv090x_config tt1600_stv090x_config = {
442 .repeater_level = STV090x_RPTLEVEL_16, 442 .repeater_level = STV090x_RPTLEVEL_16,
443 443
444 .tuner_init = NULL, 444 .tuner_init = NULL,
445 .tuner_sleep = NULL,
445 .tuner_set_mode = NULL, 446 .tuner_set_mode = NULL,
446 .tuner_set_frequency = NULL, 447 .tuner_set_frequency = NULL,
447 .tuner_get_frequency = NULL, 448 .tuner_get_frequency = NULL,
@@ -627,22 +628,36 @@ static void frontend_init(struct budget *budget)
627 &tt1600_stv6110x_config, 628 &tt1600_stv6110x_config,
628 &budget->i2c_adap); 629 &budget->i2c_adap);
629 630
630 tt1600_stv090x_config.tuner_init = ctl->tuner_init; 631 if (ctl) {
631 tt1600_stv090x_config.tuner_set_mode = ctl->tuner_set_mode; 632 tt1600_stv090x_config.tuner_init = ctl->tuner_init;
632 tt1600_stv090x_config.tuner_set_frequency = ctl->tuner_set_frequency; 633 tt1600_stv090x_config.tuner_sleep = ctl->tuner_sleep;
633 tt1600_stv090x_config.tuner_get_frequency = ctl->tuner_get_frequency; 634 tt1600_stv090x_config.tuner_set_mode = ctl->tuner_set_mode;
634 tt1600_stv090x_config.tuner_set_bandwidth = ctl->tuner_set_bandwidth; 635 tt1600_stv090x_config.tuner_set_frequency = ctl->tuner_set_frequency;
635 tt1600_stv090x_config.tuner_get_bandwidth = ctl->tuner_get_bandwidth; 636 tt1600_stv090x_config.tuner_get_frequency = ctl->tuner_get_frequency;
636 tt1600_stv090x_config.tuner_set_bbgain = ctl->tuner_set_bbgain; 637 tt1600_stv090x_config.tuner_set_bandwidth = ctl->tuner_set_bandwidth;
637 tt1600_stv090x_config.tuner_get_bbgain = ctl->tuner_get_bbgain; 638 tt1600_stv090x_config.tuner_get_bandwidth = ctl->tuner_get_bandwidth;
638 tt1600_stv090x_config.tuner_set_refclk = ctl->tuner_set_refclk; 639 tt1600_stv090x_config.tuner_set_bbgain = ctl->tuner_set_bbgain;
639 tt1600_stv090x_config.tuner_get_status = ctl->tuner_get_status; 640 tt1600_stv090x_config.tuner_get_bbgain = ctl->tuner_get_bbgain;
640 641 tt1600_stv090x_config.tuner_set_refclk = ctl->tuner_set_refclk;
641 dvb_attach(isl6423_attach, 642 tt1600_stv090x_config.tuner_get_status = ctl->tuner_get_status;
642 budget->dvb_frontend, 643
643 &budget->i2c_adap, 644 /* call the init function once to initialize
644 &tt1600_isl6423_config); 645 tuner's clock output divider and demod's
645 646 master clock */
647 if (budget->dvb_frontend->ops.init)
648 budget->dvb_frontend->ops.init(budget->dvb_frontend);
649
650 if (dvb_attach(isl6423_attach,
651 budget->dvb_frontend,
652 &budget->i2c_adap,
653 &tt1600_isl6423_config) == NULL) {
654 printk(KERN_ERR "%s: No Intersil ISL6423 found!\n", __func__);
655 goto error_out;
656 }
657 } else {
658 printk(KERN_ERR "%s: No STV6110(A) Silicon Tuner found!\n", __func__);
659 goto error_out;
660 }
646 } 661 }
647 } 662 }
648 break; 663 break;