aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-usb/m920x.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb/dvb-usb/m920x.c')
-rw-r--r--drivers/media/dvb/dvb-usb/m920x.c34
1 files changed, 20 insertions, 14 deletions
diff --git a/drivers/media/dvb/dvb-usb/m920x.c b/drivers/media/dvb/dvb-usb/m920x.c
index a956bc503a4c..a12e6f784fda 100644
--- a/drivers/media/dvb/dvb-usb/m920x.c
+++ b/drivers/media/dvb/dvb-usb/m920x.c
@@ -22,6 +22,8 @@ static int dvb_usb_m920x_debug;
22module_param_named(debug,dvb_usb_m920x_debug, int, 0644); 22module_param_named(debug,dvb_usb_m920x_debug, int, 0644);
23MODULE_PARM_DESC(debug, "set debugging level (1=rc (or-able))." DVB_USB_DEBUG_STATUS); 23MODULE_PARM_DESC(debug, "set debugging level (1=rc (or-able))." DVB_USB_DEBUG_STATUS);
24 24
25DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
26
25static int m920x_set_filter(struct dvb_usb_device *d, int type, int idx, int pid); 27static int m920x_set_filter(struct dvb_usb_device *d, int type, int idx, int pid);
26 28
27static inline int m920x_read(struct usb_device *udev, u8 request, u16 value, 29static inline int m920x_read(struct usb_device *udev, u8 request, u16 value,
@@ -477,7 +479,7 @@ static struct qt1010_config m920x_qt1010_config = {
477/* Callbacks for DVB USB */ 479/* Callbacks for DVB USB */
478static int m920x_mt352_frontend_attach(struct dvb_usb_adapter *adap) 480static int m920x_mt352_frontend_attach(struct dvb_usb_adapter *adap)
479{ 481{
480 deb("%s\n",__FUNCTION__); 482 deb("%s\n",__func__);
481 483
482 if ((adap->fe = dvb_attach(mt352_attach, 484 if ((adap->fe = dvb_attach(mt352_attach,
483 &m920x_mt352_config, 485 &m920x_mt352_config,
@@ -489,7 +491,7 @@ static int m920x_mt352_frontend_attach(struct dvb_usb_adapter *adap)
489 491
490static int m920x_tda10046_08_frontend_attach(struct dvb_usb_adapter *adap) 492static int m920x_tda10046_08_frontend_attach(struct dvb_usb_adapter *adap)
491{ 493{
492 deb("%s\n",__FUNCTION__); 494 deb("%s\n",__func__);
493 495
494 if ((adap->fe = dvb_attach(tda10046_attach, 496 if ((adap->fe = dvb_attach(tda10046_attach,
495 &m920x_tda10046_08_config, 497 &m920x_tda10046_08_config,
@@ -501,7 +503,7 @@ static int m920x_tda10046_08_frontend_attach(struct dvb_usb_adapter *adap)
501 503
502static int m920x_tda10046_0b_frontend_attach(struct dvb_usb_adapter *adap) 504static int m920x_tda10046_0b_frontend_attach(struct dvb_usb_adapter *adap)
503{ 505{
504 deb("%s\n",__FUNCTION__); 506 deb("%s\n",__func__);
505 507
506 if ((adap->fe = dvb_attach(tda10046_attach, 508 if ((adap->fe = dvb_attach(tda10046_attach,
507 &m920x_tda10046_0b_config, 509 &m920x_tda10046_0b_config,
@@ -513,7 +515,7 @@ static int m920x_tda10046_0b_frontend_attach(struct dvb_usb_adapter *adap)
513 515
514static int m920x_qt1010_tuner_attach(struct dvb_usb_adapter *adap) 516static int m920x_qt1010_tuner_attach(struct dvb_usb_adapter *adap)
515{ 517{
516 deb("%s\n",__FUNCTION__); 518 deb("%s\n",__func__);
517 519
518 if (dvb_attach(qt1010_attach, adap->fe, &adap->dev->i2c_adap, &m920x_qt1010_config) == NULL) 520 if (dvb_attach(qt1010_attach, adap->fe, &adap->dev->i2c_adap, &m920x_qt1010_config) == NULL)
519 return -ENODEV; 521 return -ENODEV;
@@ -523,7 +525,7 @@ static int m920x_qt1010_tuner_attach(struct dvb_usb_adapter *adap)
523 525
524static int m920x_tda8275_60_tuner_attach(struct dvb_usb_adapter *adap) 526static int m920x_tda8275_60_tuner_attach(struct dvb_usb_adapter *adap)
525{ 527{
526 deb("%s\n",__FUNCTION__); 528 deb("%s\n",__func__);
527 529
528 if (dvb_attach(tda827x_attach, adap->fe, 0x60, &adap->dev->i2c_adap, NULL) == NULL) 530 if (dvb_attach(tda827x_attach, adap->fe, 0x60, &adap->dev->i2c_adap, NULL) == NULL)
529 return -ENODEV; 531 return -ENODEV;
@@ -533,7 +535,7 @@ static int m920x_tda8275_60_tuner_attach(struct dvb_usb_adapter *adap)
533 535
534static int m920x_tda8275_61_tuner_attach(struct dvb_usb_adapter *adap) 536static int m920x_tda8275_61_tuner_attach(struct dvb_usb_adapter *adap)
535{ 537{
536 deb("%s\n",__FUNCTION__); 538 deb("%s\n",__func__);
537 539
538 if (dvb_attach(tda827x_attach, adap->fe, 0x61, &adap->dev->i2c_adap, NULL) == NULL) 540 if (dvb_attach(tda827x_attach, adap->fe, 0x61, &adap->dev->i2c_adap, NULL) == NULL)
539 return -ENODEV; 541 return -ENODEV;
@@ -618,27 +620,31 @@ static int m920x_probe(struct usb_interface *intf,
618 * multi-tuner device 620 * multi-tuner device
619 */ 621 */
620 622
621 if ((ret = dvb_usb_device_init(intf, &megasky_properties, 623 ret = dvb_usb_device_init(intf, &megasky_properties,
622 THIS_MODULE, &d)) == 0) { 624 THIS_MODULE, &d, adapter_nr);
625 if (ret == 0) {
623 rc_init_seq = megasky_rc_init; 626 rc_init_seq = megasky_rc_init;
624 goto found; 627 goto found;
625 } 628 }
626 629
627 if ((ret = dvb_usb_device_init(intf, &digivox_mini_ii_properties, 630 ret = dvb_usb_device_init(intf, &digivox_mini_ii_properties,
628 THIS_MODULE, &d)) == 0) { 631 THIS_MODULE, &d, adapter_nr);
632 if (ret == 0) {
629 /* No remote control, so no rc_init_seq */ 633 /* No remote control, so no rc_init_seq */
630 goto found; 634 goto found;
631 } 635 }
632 636
633 /* This configures both tuners on the TV Walker Twin */ 637 /* This configures both tuners on the TV Walker Twin */
634 if ((ret = dvb_usb_device_init(intf, &tvwalkertwin_properties, 638 ret = dvb_usb_device_init(intf, &tvwalkertwin_properties,
635 THIS_MODULE, &d)) == 0) { 639 THIS_MODULE, &d, adapter_nr);
640 if (ret == 0) {
636 rc_init_seq = tvwalkertwin_rc_init; 641 rc_init_seq = tvwalkertwin_rc_init;
637 goto found; 642 goto found;
638 } 643 }
639 644
640 if ((ret = dvb_usb_device_init(intf, &dposh_properties, 645 ret = dvb_usb_device_init(intf, &dposh_properties,
641 THIS_MODULE, &d)) == 0) { 646 THIS_MODULE, &d, adapter_nr);
647 if (ret == 0) {
642 /* Remote controller not supported yet. */ 648 /* Remote controller not supported yet. */
643 goto found; 649 goto found;
644 } 650 }