aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/ttusb-budget
diff options
context:
space:
mode:
authorAndrew de Quincey <adq_dvb@lidskialf.net>2006-08-08 08:10:08 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-09-26 10:53:25 -0400
commit2bfe031df6bd5e3b8e503eba8e3b6461d7c2c27e (patch)
tree2d7288c2221fb6f7ef98ef7a1ee3fef3f04cf87e /drivers/media/dvb/ttusb-budget
parentd995506062c974133ba66d0822e58a923d4d74d9 (diff)
V4L/DVB (4386): Convert DVB devices to use dvb_attach()
Only devices using > 1 frontend were ported; ones which did not are left using static binding. Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net> Acked-by: Michael Krufky <mkrufky@linuxtv.org> Acked-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/ttusb-budget')
-rw-r--r--drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
index 3c299df89410..6f58c66d6ef9 100644
--- a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
+++ b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
@@ -1564,13 +1564,13 @@ static void frontend_init(struct ttusb* ttusb)
1564 switch(le16_to_cpu(ttusb->dev->descriptor.idProduct)) { 1564 switch(le16_to_cpu(ttusb->dev->descriptor.idProduct)) {
1565 case 0x1003: // Hauppauge/TT Nova-USB-S budget (stv0299/ALPS BSRU6|BSBE1(tsa5059)) 1565 case 0x1003: // Hauppauge/TT Nova-USB-S budget (stv0299/ALPS BSRU6|BSBE1(tsa5059))
1566 // try the stv0299 based first 1566 // try the stv0299 based first
1567 ttusb->fe = stv0299_attach(&alps_stv0299_config, &ttusb->i2c_adap); 1567 ttusb->fe = dvb_attach(stv0299_attach, &alps_stv0299_config, &ttusb->i2c_adap);
1568 if (ttusb->fe != NULL) { 1568 if (ttusb->fe != NULL) {
1569 ttusb->fe->ops.tuner_ops.set_params = philips_tsa5059_tuner_set_params; 1569 ttusb->fe->ops.tuner_ops.set_params = philips_tsa5059_tuner_set_params;
1570 1570
1571 if(ttusb->revision == TTUSB_REV_2_2) { // ALPS BSBE1 1571 if(ttusb->revision == TTUSB_REV_2_2) { // ALPS BSBE1
1572 alps_stv0299_config.inittab = alps_bsbe1_inittab; 1572 alps_stv0299_config.inittab = alps_bsbe1_inittab;
1573 lnbp21_attach(ttusb->fe, &ttusb->i2c_adap, 0, 0); 1573 dvb_attach(lnbp21_attach, ttusb->fe, &ttusb->i2c_adap, 0, 0);
1574 } else { // ALPS BSRU6 1574 } else { // ALPS BSRU6
1575 ttusb->fe->ops.set_voltage = ttusb_set_voltage; 1575 ttusb->fe->ops.set_voltage = ttusb_set_voltage;
1576 } 1576 }
@@ -1578,7 +1578,7 @@ static void frontend_init(struct ttusb* ttusb)
1578 } 1578 }
1579 1579
1580 // Grundig 29504-491 1580 // Grundig 29504-491
1581 ttusb->fe = tda8083_attach(&ttusb_novas_grundig_29504_491_config, &ttusb->i2c_adap); 1581 ttusb->fe = dvb_attach(tda8083_attach, &ttusb_novas_grundig_29504_491_config, &ttusb->i2c_adap);
1582 if (ttusb->fe != NULL) { 1582 if (ttusb->fe != NULL) {
1583 ttusb->fe->ops.tuner_ops.set_params = ttusb_novas_grundig_29504_491_tuner_set_params; 1583 ttusb->fe->ops.tuner_ops.set_params = ttusb_novas_grundig_29504_491_tuner_set_params;
1584 ttusb->fe->ops.set_voltage = ttusb_set_voltage; 1584 ttusb->fe->ops.set_voltage = ttusb_set_voltage;
@@ -1587,13 +1587,13 @@ static void frontend_init(struct ttusb* ttusb)
1587 break; 1587 break;
1588 1588
1589 case 0x1004: // Hauppauge/TT DVB-C budget (ves1820/ALPS TDBE2(sp5659)) 1589 case 0x1004: // Hauppauge/TT DVB-C budget (ves1820/ALPS TDBE2(sp5659))
1590 ttusb->fe = ves1820_attach(&alps_tdbe2_config, &ttusb->i2c_adap, read_pwm(ttusb)); 1590 ttusb->fe = dvb_attach(ves1820_attach, &alps_tdbe2_config, &ttusb->i2c_adap, read_pwm(ttusb));
1591 if (ttusb->fe != NULL) { 1591 if (ttusb->fe != NULL) {
1592 ttusb->fe->ops.tuner_ops.set_params = alps_tdbe2_tuner_set_params; 1592 ttusb->fe->ops.tuner_ops.set_params = alps_tdbe2_tuner_set_params;
1593 break; 1593 break;
1594 } 1594 }
1595 1595
1596 ttusb->fe = stv0297_attach(&dvbc_philips_tdm1316l_config, &ttusb->i2c_adap); 1596 ttusb->fe = dvb_attach(stv0297_attach, &dvbc_philips_tdm1316l_config, &ttusb->i2c_adap);
1597 if (ttusb->fe != NULL) { 1597 if (ttusb->fe != NULL) {
1598 ttusb->fe->ops.tuner_ops.set_params = dvbc_philips_tdm1316l_tuner_set_params; 1598 ttusb->fe->ops.tuner_ops.set_params = dvbc_philips_tdm1316l_tuner_set_params;
1599 break; 1599 break;
@@ -1602,14 +1602,14 @@ static void frontend_init(struct ttusb* ttusb)
1602 1602
1603 case 0x1005: // Hauppauge/TT Nova-USB-t budget (tda10046/Philips td1316(tda6651tt) OR cx22700/ALPS TDMB7(??)) 1603 case 0x1005: // Hauppauge/TT Nova-USB-t budget (tda10046/Philips td1316(tda6651tt) OR cx22700/ALPS TDMB7(??))
1604 // try the ALPS TDMB7 first 1604 // try the ALPS TDMB7 first
1605 ttusb->fe = cx22700_attach(&alps_tdmb7_config, &ttusb->i2c_adap); 1605 ttusb->fe = dvb_attach(cx22700_attach, &alps_tdmb7_config, &ttusb->i2c_adap);
1606 if (ttusb->fe != NULL) { 1606 if (ttusb->fe != NULL) {
1607 ttusb->fe->ops.tuner_ops.set_params = alps_tdmb7_tuner_set_params; 1607 ttusb->fe->ops.tuner_ops.set_params = alps_tdmb7_tuner_set_params;
1608 break; 1608 break;
1609 } 1609 }
1610 1610
1611 // Philips td1316 1611 // Philips td1316
1612 ttusb->fe = tda10046_attach(&philips_tdm1316l_config, &ttusb->i2c_adap); 1612 ttusb->fe = dvb_attach(tda10046_attach, &philips_tdm1316l_config, &ttusb->i2c_adap);
1613 if (ttusb->fe != NULL) { 1613 if (ttusb->fe != NULL) {
1614 ttusb->fe->ops.tuner_ops.init = philips_tdm1316l_tuner_init; 1614 ttusb->fe->ops.tuner_ops.init = philips_tdm1316l_tuner_init;
1615 ttusb->fe->ops.tuner_ops.set_params = philips_tdm1316l_tuner_set_params; 1615 ttusb->fe->ops.tuner_ops.set_params = philips_tdm1316l_tuner_set_params;
@@ -1625,8 +1625,9 @@ static void frontend_init(struct ttusb* ttusb)
1625 } else { 1625 } else {
1626 if (dvb_register_frontend(&ttusb->adapter, ttusb->fe)) { 1626 if (dvb_register_frontend(&ttusb->adapter, ttusb->fe)) {
1627 printk("dvb-ttusb-budget: Frontend registration failed!\n"); 1627 printk("dvb-ttusb-budget: Frontend registration failed!\n");
1628 if (ttusb->fe->ops.release) 1628 dvb_detach(ttusb->fe->ops.release_sec, ttusb->fe);
1629 ttusb->fe->ops.release(ttusb->fe); 1629 dvb_detach(ttusb->fe->ops.tuner_ops.release, ttusb->fe);
1630 dvb_detach(ttusb->fe->ops.release, ttusb->fe);
1630 ttusb->fe = NULL; 1631 ttusb->fe = NULL;
1631 } 1632 }
1632 } 1633 }
@@ -1763,7 +1764,12 @@ static void ttusb_disconnect(struct usb_interface *intf)
1763 dvb_net_release(&ttusb->dvbnet); 1764 dvb_net_release(&ttusb->dvbnet);
1764 dvb_dmxdev_release(&ttusb->dmxdev); 1765 dvb_dmxdev_release(&ttusb->dmxdev);
1765 dvb_dmx_release(&ttusb->dvb_demux); 1766 dvb_dmx_release(&ttusb->dvb_demux);
1766 if (ttusb->fe != NULL) dvb_unregister_frontend(ttusb->fe); 1767 if (ttusb->fe != NULL) {
1768 dvb_unregister_frontend(ttusb->fe);
1769 dvb_detach(ttusb->fe->ops.release_sec, ttusb->fe);
1770 dvb_detach(ttusb->fe->ops.tuner_ops.release, ttusb->fe);
1771 dvb_detach(ttusb->fe->ops.release, ttusb->fe);
1772 }
1767 i2c_del_adapter(&ttusb->i2c_adap); 1773 i2c_del_adapter(&ttusb->i2c_adap);
1768 dvb_unregister_adapter(&ttusb->adapter); 1774 dvb_unregister_adapter(&ttusb->adapter);
1769 1775