diff options
author | Andrew de Quincey <adq_dvb@lidskialf.net> | 2006-08-08 08:10:08 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-09-26 10:53:25 -0400 |
commit | 2bfe031df6bd5e3b8e503eba8e3b6461d7c2c27e (patch) | |
tree | 2d7288c2221fb6f7ef98ef7a1ee3fef3f04cf87e /drivers/media/video | |
parent | d995506062c974133ba66d0822e58a923d4d74d9 (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/video')
-rw-r--r-- | drivers/media/video/cx88/cx88-dvb.c | 64 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-dvb.c | 40 | ||||
-rw-r--r-- | drivers/media/video/video-buf-dvb.c | 6 |
3 files changed, 58 insertions, 52 deletions
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c index afde3789d702..6afa3fba1f4f 100644 --- a/drivers/media/video/cx88/cx88-dvb.c +++ b/drivers/media/video/cx88/cx88-dvb.c | |||
@@ -537,10 +537,10 @@ static int dvb_register(struct cx8802_dev *dev) | |||
537 | switch (dev->core->board) { | 537 | switch (dev->core->board) { |
538 | #ifdef HAVE_CX22702 | 538 | #ifdef HAVE_CX22702 |
539 | case CX88_BOARD_HAUPPAUGE_DVB_T1: | 539 | case CX88_BOARD_HAUPPAUGE_DVB_T1: |
540 | dev->dvb.frontend = cx22702_attach(&hauppauge_novat_config, | 540 | dev->dvb.frontend = dvb_attach(cx22702_attach, &hauppauge_novat_config, |
541 | &dev->core->i2c_adap); | 541 | &dev->core->i2c_adap); |
542 | if (dev->dvb.frontend != NULL) { | 542 | if (dev->dvb.frontend != NULL) { |
543 | dvb_pll_attach(dev->dvb.frontend, 0x61, | 543 | dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61, |
544 | &dev->core->i2c_adap, | 544 | &dev->core->i2c_adap, |
545 | &dvb_pll_thomson_dtt759x); | 545 | &dvb_pll_thomson_dtt759x); |
546 | } | 546 | } |
@@ -549,10 +549,10 @@ static int dvb_register(struct cx8802_dev *dev) | |||
549 | case CX88_BOARD_CONEXANT_DVB_T1: | 549 | case CX88_BOARD_CONEXANT_DVB_T1: |
550 | case CX88_BOARD_KWORLD_DVB_T_CX22702: | 550 | case CX88_BOARD_KWORLD_DVB_T_CX22702: |
551 | case CX88_BOARD_WINFAST_DTV1000: | 551 | case CX88_BOARD_WINFAST_DTV1000: |
552 | dev->dvb.frontend = cx22702_attach(&connexant_refboard_config, | 552 | dev->dvb.frontend = dvb_attach(cx22702_attach, &connexant_refboard_config, |
553 | &dev->core->i2c_adap); | 553 | &dev->core->i2c_adap); |
554 | if (dev->dvb.frontend != NULL) { | 554 | if (dev->dvb.frontend != NULL) { |
555 | dvb_pll_attach(dev->dvb.frontend, 0x60, | 555 | dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x60, |
556 | &dev->core->i2c_adap, | 556 | &dev->core->i2c_adap, |
557 | &dvb_pll_thomson_dtt7579); | 557 | &dvb_pll_thomson_dtt7579); |
558 | } | 558 | } |
@@ -560,10 +560,10 @@ static int dvb_register(struct cx8802_dev *dev) | |||
560 | case CX88_BOARD_WINFAST_DTV2000H: | 560 | case CX88_BOARD_WINFAST_DTV2000H: |
561 | case CX88_BOARD_HAUPPAUGE_HVR1100: | 561 | case CX88_BOARD_HAUPPAUGE_HVR1100: |
562 | case CX88_BOARD_HAUPPAUGE_HVR1100LP: | 562 | case CX88_BOARD_HAUPPAUGE_HVR1100LP: |
563 | dev->dvb.frontend = cx22702_attach(&hauppauge_hvr1100_config, | 563 | dev->dvb.frontend = dvb_attach(cx22702_attach, &hauppauge_hvr1100_config, |
564 | &dev->core->i2c_adap); | 564 | &dev->core->i2c_adap); |
565 | if (dev->dvb.frontend != NULL) { | 565 | if (dev->dvb.frontend != NULL) { |
566 | dvb_pll_attach(dev->dvb.frontend, 0x61, | 566 | dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61, |
567 | &dev->core->i2c_adap, | 567 | &dev->core->i2c_adap, |
568 | &dvb_pll_fmd1216me); | 568 | &dvb_pll_fmd1216me); |
569 | } | 569 | } |
@@ -572,10 +572,10 @@ static int dvb_register(struct cx8802_dev *dev) | |||
572 | #if defined(HAVE_MT352) || defined(HAVE_ZL10353) | 572 | #if defined(HAVE_MT352) || defined(HAVE_ZL10353) |
573 | case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS: | 573 | case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS: |
574 | #ifdef HAVE_MT352 | 574 | #ifdef HAVE_MT352 |
575 | dev->dvb.frontend = mt352_attach(&dvico_fusionhdtv, | 575 | dev->dvb.frontend = dvb_attach(mt352_attach, &dvico_fusionhdtv, |
576 | &dev->core->i2c_adap); | 576 | &dev->core->i2c_adap); |
577 | if (dev->dvb.frontend != NULL) { | 577 | if (dev->dvb.frontend != NULL) { |
578 | dvb_pll_attach(dev->dvb.frontend, 0x60, | 578 | dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x60, |
579 | &dev->core->i2c_adap, | 579 | &dev->core->i2c_adap, |
580 | &dvb_pll_thomson_dtt7579); | 580 | &dvb_pll_thomson_dtt7579); |
581 | break; | 581 | break; |
@@ -583,10 +583,10 @@ static int dvb_register(struct cx8802_dev *dev) | |||
583 | #endif | 583 | #endif |
584 | #ifdef HAVE_ZL10353 | 584 | #ifdef HAVE_ZL10353 |
585 | /* ZL10353 replaces MT352 on later cards */ | 585 | /* ZL10353 replaces MT352 on later cards */ |
586 | dev->dvb.frontend = zl10353_attach(&dvico_fusionhdtv_plus_v1_1, | 586 | dev->dvb.frontend = dvb_attach(zl10353_attach, &dvico_fusionhdtv_plus_v1_1, |
587 | &dev->core->i2c_adap); | 587 | &dev->core->i2c_adap); |
588 | if (dev->dvb.frontend != NULL) { | 588 | if (dev->dvb.frontend != NULL) { |
589 | dvb_pll_attach(dev->dvb.frontend, 0x60, | 589 | dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x60, |
590 | &dev->core->i2c_adap, | 590 | &dev->core->i2c_adap, |
591 | &dvb_pll_thomson_dtt7579); | 591 | &dvb_pll_thomson_dtt7579); |
592 | } | 592 | } |
@@ -596,10 +596,10 @@ static int dvb_register(struct cx8802_dev *dev) | |||
596 | #ifdef HAVE_MT352 | 596 | #ifdef HAVE_MT352 |
597 | /* The tin box says DEE1601, but it seems to be DTT7579 | 597 | /* The tin box says DEE1601, but it seems to be DTT7579 |
598 | * compatible, with a slightly different MT352 AGC gain. */ | 598 | * compatible, with a slightly different MT352 AGC gain. */ |
599 | dev->dvb.frontend = mt352_attach(&dvico_fusionhdtv_dual, | 599 | dev->dvb.frontend = dvb_attach(mt352_attach, &dvico_fusionhdtv_dual, |
600 | &dev->core->i2c_adap); | 600 | &dev->core->i2c_adap); |
601 | if (dev->dvb.frontend != NULL) { | 601 | if (dev->dvb.frontend != NULL) { |
602 | dvb_pll_attach(dev->dvb.frontend, 0x61, | 602 | dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61, |
603 | &dev->core->i2c_adap, | 603 | &dev->core->i2c_adap, |
604 | &dvb_pll_thomson_dtt7579); | 604 | &dvb_pll_thomson_dtt7579); |
605 | break; | 605 | break; |
@@ -607,10 +607,10 @@ static int dvb_register(struct cx8802_dev *dev) | |||
607 | #endif | 607 | #endif |
608 | #ifdef HAVE_ZL10353 | 608 | #ifdef HAVE_ZL10353 |
609 | /* ZL10353 replaces MT352 on later cards */ | 609 | /* ZL10353 replaces MT352 on later cards */ |
610 | dev->dvb.frontend = zl10353_attach(&dvico_fusionhdtv_plus_v1_1, | 610 | dev->dvb.frontend = dvb_attach(zl10353_attach, &dvico_fusionhdtv_plus_v1_1, |
611 | &dev->core->i2c_adap); | 611 | &dev->core->i2c_adap); |
612 | if (dev->dvb.frontend != NULL) { | 612 | if (dev->dvb.frontend != NULL) { |
613 | dvb_pll_attach(dev->dvb.frontend, 0x61, | 613 | dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61, |
614 | &dev->core->i2c_adap, | 614 | &dev->core->i2c_adap, |
615 | &dvb_pll_thomson_dtt7579); | 615 | &dvb_pll_thomson_dtt7579); |
616 | } | 616 | } |
@@ -619,10 +619,10 @@ static int dvb_register(struct cx8802_dev *dev) | |||
619 | #endif /* HAVE_MT352 || HAVE_ZL10353 */ | 619 | #endif /* HAVE_MT352 || HAVE_ZL10353 */ |
620 | #ifdef HAVE_MT352 | 620 | #ifdef HAVE_MT352 |
621 | case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1: | 621 | case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1: |
622 | dev->dvb.frontend = mt352_attach(&dvico_fusionhdtv, | 622 | dev->dvb.frontend = dvb_attach(mt352_attach, &dvico_fusionhdtv, |
623 | &dev->core->i2c_adap); | 623 | &dev->core->i2c_adap); |
624 | if (dev->dvb.frontend != NULL) { | 624 | if (dev->dvb.frontend != NULL) { |
625 | dvb_pll_attach(dev->dvb.frontend, 0x61, | 625 | dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61, |
626 | &dev->core->i2c_adap, | 626 | &dev->core->i2c_adap, |
627 | &dvb_pll_lg_z201); | 627 | &dvb_pll_lg_z201); |
628 | } | 628 | } |
@@ -630,10 +630,10 @@ static int dvb_register(struct cx8802_dev *dev) | |||
630 | case CX88_BOARD_KWORLD_DVB_T: | 630 | case CX88_BOARD_KWORLD_DVB_T: |
631 | case CX88_BOARD_DNTV_LIVE_DVB_T: | 631 | case CX88_BOARD_DNTV_LIVE_DVB_T: |
632 | case CX88_BOARD_ADSTECH_DVB_T_PCI: | 632 | case CX88_BOARD_ADSTECH_DVB_T_PCI: |
633 | dev->dvb.frontend = mt352_attach(&dntv_live_dvbt_config, | 633 | dev->dvb.frontend = dvb_attach(mt352_attach, &dntv_live_dvbt_config, |
634 | &dev->core->i2c_adap); | 634 | &dev->core->i2c_adap); |
635 | if (dev->dvb.frontend != NULL) { | 635 | if (dev->dvb.frontend != NULL) { |
636 | dvb_pll_attach(dev->dvb.frontend, 0x61, | 636 | dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61, |
637 | &dev->core->i2c_adap, | 637 | &dev->core->i2c_adap, |
638 | &dvb_pll_unknown_1); | 638 | &dvb_pll_unknown_1); |
639 | } | 639 | } |
@@ -642,7 +642,7 @@ static int dvb_register(struct cx8802_dev *dev) | |||
642 | #ifdef HAVE_VP3054_I2C | 642 | #ifdef HAVE_VP3054_I2C |
643 | dev->core->pll_addr = 0x61; | 643 | dev->core->pll_addr = 0x61; |
644 | dev->core->pll_desc = &dvb_pll_fmd1216me; | 644 | dev->core->pll_desc = &dvb_pll_fmd1216me; |
645 | dev->dvb.frontend = mt352_attach(&dntv_live_dvbt_pro_config, | 645 | dev->dvb.frontend = dvb_attach(mt352_attach, &dntv_live_dvbt_pro_config, |
646 | &((struct vp3054_i2c_state *)dev->card_priv)->adap); | 646 | &((struct vp3054_i2c_state *)dev->card_priv)->adap); |
647 | if (dev->dvb.frontend != NULL) { | 647 | if (dev->dvb.frontend != NULL) { |
648 | dev->dvb.frontend->ops.tuner_ops.set_params = dntv_live_dvbt_pro_tuner_set_params; | 648 | dev->dvb.frontend->ops.tuner_ops.set_params = dntv_live_dvbt_pro_tuner_set_params; |
@@ -656,7 +656,7 @@ static int dvb_register(struct cx8802_dev *dev) | |||
656 | case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID: | 656 | case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID: |
657 | dev->core->pll_addr = 0x61; | 657 | dev->core->pll_addr = 0x61; |
658 | dev->core->pll_desc = &dvb_pll_thomson_fe6600; | 658 | dev->core->pll_desc = &dvb_pll_thomson_fe6600; |
659 | dev->dvb.frontend = zl10353_attach(&dvico_fusionhdtv_hybrid, | 659 | dev->dvb.frontend = dvb_attach(zl10353_attach, &dvico_fusionhdtv_hybrid, |
660 | &dev->core->i2c_adap); | 660 | &dev->core->i2c_adap); |
661 | if (dev->dvb.frontend != NULL) { | 661 | if (dev->dvb.frontend != NULL) { |
662 | dev->dvb.frontend->ops.tuner_ops.set_params = dvico_hybrid_tuner_set_params; | 662 | dev->dvb.frontend->ops.tuner_ops.set_params = dvico_hybrid_tuner_set_params; |
@@ -665,10 +665,10 @@ static int dvb_register(struct cx8802_dev *dev) | |||
665 | #endif | 665 | #endif |
666 | #ifdef HAVE_OR51132 | 666 | #ifdef HAVE_OR51132 |
667 | case CX88_BOARD_PCHDTV_HD3000: | 667 | case CX88_BOARD_PCHDTV_HD3000: |
668 | dev->dvb.frontend = or51132_attach(&pchdtv_hd3000, | 668 | dev->dvb.frontend = dvb_attach(or51132_attach, &pchdtv_hd3000, |
669 | &dev->core->i2c_adap); | 669 | &dev->core->i2c_adap); |
670 | if (dev->dvb.frontend != NULL) { | 670 | if (dev->dvb.frontend != NULL) { |
671 | dvb_pll_attach(dev->dvb.frontend, 0x61, | 671 | dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61, |
672 | &dev->core->i2c_adap, | 672 | &dev->core->i2c_adap, |
673 | &dvb_pll_thomson_dtt761x); | 673 | &dvb_pll_thomson_dtt761x); |
674 | } | 674 | } |
@@ -690,7 +690,7 @@ static int dvb_register(struct cx8802_dev *dev) | |||
690 | fusionhdtv_3_gold.pll_rf_set = lgdt330x_pll_rf_set; | 690 | fusionhdtv_3_gold.pll_rf_set = lgdt330x_pll_rf_set; |
691 | dev->core->pll_addr = 0x61; | 691 | dev->core->pll_addr = 0x61; |
692 | dev->core->pll_desc = &dvb_pll_microtune_4042; | 692 | dev->core->pll_desc = &dvb_pll_microtune_4042; |
693 | dev->dvb.frontend = lgdt330x_attach(&fusionhdtv_3_gold, | 693 | dev->dvb.frontend = dvb_attach(lgdt330x_attach, &fusionhdtv_3_gold, |
694 | &dev->core->i2c_adap); | 694 | &dev->core->i2c_adap); |
695 | if (dev->dvb.frontend != NULL) { | 695 | if (dev->dvb.frontend != NULL) { |
696 | dev->dvb.frontend->ops.tuner_ops.set_params = lgdt3302_tuner_set_params; | 696 | dev->dvb.frontend->ops.tuner_ops.set_params = lgdt3302_tuner_set_params; |
@@ -709,7 +709,7 @@ static int dvb_register(struct cx8802_dev *dev) | |||
709 | mdelay(200); | 709 | mdelay(200); |
710 | dev->core->pll_addr = 0x61; | 710 | dev->core->pll_addr = 0x61; |
711 | dev->core->pll_desc = &dvb_pll_thomson_dtt761x; | 711 | dev->core->pll_desc = &dvb_pll_thomson_dtt761x; |
712 | dev->dvb.frontend = lgdt330x_attach(&fusionhdtv_3_gold, | 712 | dev->dvb.frontend = dvb_attach(lgdt330x_attach, &fusionhdtv_3_gold, |
713 | &dev->core->i2c_adap); | 713 | &dev->core->i2c_adap); |
714 | if (dev->dvb.frontend != NULL) { | 714 | if (dev->dvb.frontend != NULL) { |
715 | dev->dvb.frontend->ops.tuner_ops.set_params = lgdt3302_tuner_set_params; | 715 | dev->dvb.frontend->ops.tuner_ops.set_params = lgdt3302_tuner_set_params; |
@@ -726,7 +726,7 @@ static int dvb_register(struct cx8802_dev *dev) | |||
726 | mdelay(100); | 726 | mdelay(100); |
727 | cx_set(MO_GP0_IO, 1); | 727 | cx_set(MO_GP0_IO, 1); |
728 | mdelay(200); | 728 | mdelay(200); |
729 | dev->dvb.frontend = lgdt330x_attach(&fusionhdtv_5_gold, | 729 | dev->dvb.frontend = dvb_attach(lgdt330x_attach, &fusionhdtv_5_gold, |
730 | &dev->core->i2c_adap); | 730 | &dev->core->i2c_adap); |
731 | if (dev->dvb.frontend != NULL) { | 731 | if (dev->dvb.frontend != NULL) { |
732 | dev->dvb.frontend->ops.tuner_ops.set_params = lgdt3303_tuner_set_params; | 732 | dev->dvb.frontend->ops.tuner_ops.set_params = lgdt3303_tuner_set_params; |
@@ -743,7 +743,7 @@ static int dvb_register(struct cx8802_dev *dev) | |||
743 | mdelay(100); | 743 | mdelay(100); |
744 | cx_set(MO_GP0_IO, 1); | 744 | cx_set(MO_GP0_IO, 1); |
745 | mdelay(200); | 745 | mdelay(200); |
746 | dev->dvb.frontend = lgdt330x_attach(&pchdtv_hd5500, | 746 | dev->dvb.frontend = dvb_attach(lgdt330x_attach, &pchdtv_hd5500, |
747 | &dev->core->i2c_adap); | 747 | &dev->core->i2c_adap); |
748 | if (dev->dvb.frontend != NULL) { | 748 | if (dev->dvb.frontend != NULL) { |
749 | dev->dvb.frontend->ops.tuner_ops.set_params = lgdt3303_tuner_set_params; | 749 | dev->dvb.frontend->ops.tuner_ops.set_params = lgdt3303_tuner_set_params; |
@@ -753,10 +753,10 @@ static int dvb_register(struct cx8802_dev *dev) | |||
753 | #endif | 753 | #endif |
754 | #ifdef HAVE_NXT200X | 754 | #ifdef HAVE_NXT200X |
755 | case CX88_BOARD_ATI_HDTVWONDER: | 755 | case CX88_BOARD_ATI_HDTVWONDER: |
756 | dev->dvb.frontend = nxt200x_attach(&ati_hdtvwonder, | 756 | dev->dvb.frontend = dvb_attach(nxt200x_attach, &ati_hdtvwonder, |
757 | &dev->core->i2c_adap); | 757 | &dev->core->i2c_adap); |
758 | if (dev->dvb.frontend != NULL) { | 758 | if (dev->dvb.frontend != NULL) { |
759 | dvb_pll_attach(dev->dvb.frontend, 0x61, | 759 | dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61, |
760 | &dev->core->i2c_adap, | 760 | &dev->core->i2c_adap, |
761 | &dvb_pll_tuv1236d); | 761 | &dvb_pll_tuv1236d); |
762 | } | 762 | } |
@@ -765,15 +765,15 @@ static int dvb_register(struct cx8802_dev *dev) | |||
765 | #ifdef HAVE_CX24123 | 765 | #ifdef HAVE_CX24123 |
766 | case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1: | 766 | case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1: |
767 | case CX88_BOARD_HAUPPAUGE_NOVASE2_S1: | 767 | case CX88_BOARD_HAUPPAUGE_NOVASE2_S1: |
768 | dev->dvb.frontend = cx24123_attach(&hauppauge_novas_config, | 768 | dev->dvb.frontend = dvb_attach(cx24123_attach, &hauppauge_novas_config, |
769 | &dev->core->i2c_adap); | 769 | &dev->core->i2c_adap); |
770 | if (dev->dvb.frontend) { | 770 | if (dev->dvb.frontend) { |
771 | isl6421_attach(dev->dvb.frontend, &dev->core->i2c_adap, | 771 | dvb_attach(isl6421_attach, dev->dvb.frontend, &dev->core->i2c_adap, |
772 | 0x08, 0x00, 0x00); | 772 | 0x08, 0x00, 0x00); |
773 | } | 773 | } |
774 | break; | 774 | break; |
775 | case CX88_BOARD_KWORLD_DVBS_100: | 775 | case CX88_BOARD_KWORLD_DVBS_100: |
776 | dev->dvb.frontend = cx24123_attach(&kworld_dvbs_100_config, | 776 | dev->dvb.frontend = dvb_attach(cx24123_attach, &kworld_dvbs_100_config, |
777 | &dev->core->i2c_adap); | 777 | &dev->core->i2c_adap); |
778 | if (dev->dvb.frontend) { | 778 | if (dev->dvb.frontend) { |
779 | dev->core->prev_set_voltage = dev->dvb.frontend->ops.set_voltage; | 779 | dev->core->prev_set_voltage = dev->dvb.frontend->ops.set_voltage; |
@@ -781,7 +781,7 @@ static int dvb_register(struct cx8802_dev *dev) | |||
781 | } | 781 | } |
782 | break; | 782 | break; |
783 | case CX88_BOARD_GENIATECH_DVBS: | 783 | case CX88_BOARD_GENIATECH_DVBS: |
784 | dev->dvb.frontend = cx24123_attach(&geniatech_dvbs_config, | 784 | dev->dvb.frontend = dvb_attach(cx24123_attach, &geniatech_dvbs_config, |
785 | &dev->core->i2c_adap); | 785 | &dev->core->i2c_adap); |
786 | if (dev->dvb.frontend) { | 786 | if (dev->dvb.frontend) { |
787 | dev->core->prev_set_voltage = dev->dvb.frontend->ops.set_voltage; | 787 | dev->core->prev_set_voltage = dev->dvb.frontend->ops.set_voltage; |
diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/video/saa7134/saa7134-dvb.c index 2ffa5b5790ae..7bc3af7af50c 100644 --- a/drivers/media/video/saa7134/saa7134-dvb.c +++ b/drivers/media/video/saa7134/saa7134-dvb.c | |||
@@ -1057,7 +1057,7 @@ static int dvb_init(struct saa7134_dev *dev) | |||
1057 | #ifdef HAVE_MT352 | 1057 | #ifdef HAVE_MT352 |
1058 | case SAA7134_BOARD_PINNACLE_300I_DVBT_PAL: | 1058 | case SAA7134_BOARD_PINNACLE_300I_DVBT_PAL: |
1059 | printk("%s: pinnacle 300i dvb setup\n",dev->name); | 1059 | printk("%s: pinnacle 300i dvb setup\n",dev->name); |
1060 | dev->dvb.frontend = mt352_attach(&pinnacle_300i, | 1060 | dev->dvb.frontend = dvb_attach(mt352_attach, &pinnacle_300i, |
1061 | &dev->i2c_adap); | 1061 | &dev->i2c_adap); |
1062 | if (dev->dvb.frontend) { | 1062 | if (dev->dvb.frontend) { |
1063 | dev->dvb.frontend->ops.tuner_ops.set_params = mt352_pinnacle_tuner_set_params; | 1063 | dev->dvb.frontend->ops.tuner_ops.set_params = mt352_pinnacle_tuner_set_params; |
@@ -1066,7 +1066,7 @@ static int dvb_init(struct saa7134_dev *dev) | |||
1066 | 1066 | ||
1067 | case SAA7134_BOARD_AVERMEDIA_777: | 1067 | case SAA7134_BOARD_AVERMEDIA_777: |
1068 | printk("%s: avertv 777 dvb setup\n",dev->name); | 1068 | printk("%s: avertv 777 dvb setup\n",dev->name); |
1069 | dev->dvb.frontend = mt352_attach(&avermedia_777, | 1069 | dev->dvb.frontend = dvb_attach(mt352_attach, &avermedia_777, |
1070 | &dev->i2c_adap); | 1070 | &dev->i2c_adap); |
1071 | if (dev->dvb.frontend) { | 1071 | if (dev->dvb.frontend) { |
1072 | dev->dvb.frontend->ops.tuner_ops.calc_regs = mt352_aver777_tuner_calc_regs; | 1072 | dev->dvb.frontend->ops.tuner_ops.calc_regs = mt352_aver777_tuner_calc_regs; |
@@ -1075,7 +1075,7 @@ static int dvb_init(struct saa7134_dev *dev) | |||
1075 | #endif | 1075 | #endif |
1076 | #ifdef HAVE_TDA1004X | 1076 | #ifdef HAVE_TDA1004X |
1077 | case SAA7134_BOARD_MD7134: | 1077 | case SAA7134_BOARD_MD7134: |
1078 | dev->dvb.frontend = tda10046_attach(&medion_cardbus, | 1078 | dev->dvb.frontend = dvb_attach(tda10046_attach, &medion_cardbus, |
1079 | &dev->i2c_adap); | 1079 | &dev->i2c_adap); |
1080 | if (dev->dvb.frontend) { | 1080 | if (dev->dvb.frontend) { |
1081 | dev->dvb.frontend->ops.tuner_ops.init = philips_fmd1216_tuner_init; | 1081 | dev->dvb.frontend->ops.tuner_ops.init = philips_fmd1216_tuner_init; |
@@ -1084,7 +1084,7 @@ static int dvb_init(struct saa7134_dev *dev) | |||
1084 | } | 1084 | } |
1085 | break; | 1085 | break; |
1086 | case SAA7134_BOARD_PHILIPS_TOUGH: | 1086 | case SAA7134_BOARD_PHILIPS_TOUGH: |
1087 | dev->dvb.frontend = tda10046_attach(&philips_tu1216_60_config, | 1087 | dev->dvb.frontend = dvb_attach(tda10046_attach, &philips_tu1216_60_config, |
1088 | &dev->i2c_adap); | 1088 | &dev->i2c_adap); |
1089 | if (dev->dvb.frontend) { | 1089 | if (dev->dvb.frontend) { |
1090 | dev->dvb.frontend->ops.tuner_ops.init = philips_tu1216_tuner_60_init; | 1090 | dev->dvb.frontend->ops.tuner_ops.init = philips_tu1216_tuner_60_init; |
@@ -1092,7 +1092,7 @@ static int dvb_init(struct saa7134_dev *dev) | |||
1092 | } | 1092 | } |
1093 | break; | 1093 | break; |
1094 | case SAA7134_BOARD_FLYDVBTDUO: | 1094 | case SAA7134_BOARD_FLYDVBTDUO: |
1095 | dev->dvb.frontend = tda10046_attach(&tda827x_lifeview_config, | 1095 | dev->dvb.frontend = dvb_attach(tda10046_attach, &tda827x_lifeview_config, |
1096 | &dev->i2c_adap); | 1096 | &dev->i2c_adap); |
1097 | if (dev->dvb.frontend) { | 1097 | if (dev->dvb.frontend) { |
1098 | dev->dvb.frontend->ops.tuner_ops.init = philips_tda827x_tuner_init; | 1098 | dev->dvb.frontend->ops.tuner_ops.init = philips_tda827x_tuner_init; |
@@ -1101,7 +1101,7 @@ static int dvb_init(struct saa7134_dev *dev) | |||
1101 | } | 1101 | } |
1102 | break; | 1102 | break; |
1103 | case SAA7134_BOARD_FLYDVBT_DUO_CARDBUS: | 1103 | case SAA7134_BOARD_FLYDVBT_DUO_CARDBUS: |
1104 | dev->dvb.frontend = tda10046_attach(&tda827x_lifeview_config, | 1104 | dev->dvb.frontend = dvb_attach(tda10046_attach, &tda827x_lifeview_config, |
1105 | &dev->i2c_adap); | 1105 | &dev->i2c_adap); |
1106 | if (dev->dvb.frontend) { | 1106 | if (dev->dvb.frontend) { |
1107 | dev->dvb.frontend->ops.tuner_ops.init = philips_tda827x_tuner_init; | 1107 | dev->dvb.frontend->ops.tuner_ops.init = philips_tda827x_tuner_init; |
@@ -1110,7 +1110,7 @@ static int dvb_init(struct saa7134_dev *dev) | |||
1110 | } | 1110 | } |
1111 | break; | 1111 | break; |
1112 | case SAA7134_BOARD_PHILIPS_EUROPA: | 1112 | case SAA7134_BOARD_PHILIPS_EUROPA: |
1113 | dev->dvb.frontend = tda10046_attach(&philips_europa_config, | 1113 | dev->dvb.frontend = dvb_attach(tda10046_attach, &philips_europa_config, |
1114 | &dev->i2c_adap); | 1114 | &dev->i2c_adap); |
1115 | if (dev->dvb.frontend) { | 1115 | if (dev->dvb.frontend) { |
1116 | dev->original_demod_sleep = dev->dvb.frontend->ops.sleep; | 1116 | dev->original_demod_sleep = dev->dvb.frontend->ops.sleep; |
@@ -1121,7 +1121,7 @@ static int dvb_init(struct saa7134_dev *dev) | |||
1121 | } | 1121 | } |
1122 | break; | 1122 | break; |
1123 | case SAA7134_BOARD_VIDEOMATE_DVBT_300: | 1123 | case SAA7134_BOARD_VIDEOMATE_DVBT_300: |
1124 | dev->dvb.frontend = tda10046_attach(&philips_europa_config, | 1124 | dev->dvb.frontend = dvb_attach(tda10046_attach, &philips_europa_config, |
1125 | &dev->i2c_adap); | 1125 | &dev->i2c_adap); |
1126 | if (dev->dvb.frontend) { | 1126 | if (dev->dvb.frontend) { |
1127 | dev->dvb.frontend->ops.tuner_ops.init = philips_europa_tuner_init; | 1127 | dev->dvb.frontend->ops.tuner_ops.init = philips_europa_tuner_init; |
@@ -1130,7 +1130,7 @@ static int dvb_init(struct saa7134_dev *dev) | |||
1130 | } | 1130 | } |
1131 | break; | 1131 | break; |
1132 | case SAA7134_BOARD_VIDEOMATE_DVBT_200: | 1132 | case SAA7134_BOARD_VIDEOMATE_DVBT_200: |
1133 | dev->dvb.frontend = tda10046_attach(&philips_tu1216_61_config, | 1133 | dev->dvb.frontend = dvb_attach(tda10046_attach, &philips_tu1216_61_config, |
1134 | &dev->i2c_adap); | 1134 | &dev->i2c_adap); |
1135 | if (dev->dvb.frontend) { | 1135 | if (dev->dvb.frontend) { |
1136 | dev->dvb.frontend->ops.tuner_ops.init = philips_tu1216_tuner_61_init; | 1136 | dev->dvb.frontend->ops.tuner_ops.init = philips_tu1216_tuner_61_init; |
@@ -1138,7 +1138,7 @@ static int dvb_init(struct saa7134_dev *dev) | |||
1138 | } | 1138 | } |
1139 | break; | 1139 | break; |
1140 | case SAA7134_BOARD_PHILIPS_TIGER: | 1140 | case SAA7134_BOARD_PHILIPS_TIGER: |
1141 | dev->dvb.frontend = tda10046_attach(&philips_tiger_config, | 1141 | dev->dvb.frontend = dvb_attach(tda10046_attach, &philips_tiger_config, |
1142 | &dev->i2c_adap); | 1142 | &dev->i2c_adap); |
1143 | if (dev->dvb.frontend) { | 1143 | if (dev->dvb.frontend) { |
1144 | dev->dvb.frontend->ops.tuner_ops.init = philips_tiger_tuner_init; | 1144 | dev->dvb.frontend->ops.tuner_ops.init = philips_tiger_tuner_init; |
@@ -1147,7 +1147,7 @@ static int dvb_init(struct saa7134_dev *dev) | |||
1147 | } | 1147 | } |
1148 | break; | 1148 | break; |
1149 | case SAA7134_BOARD_ASUSTeK_P7131_DUAL: | 1149 | case SAA7134_BOARD_ASUSTeK_P7131_DUAL: |
1150 | dev->dvb.frontend = tda10046_attach(&philips_tiger_config, | 1150 | dev->dvb.frontend = dvb_attach(tda10046_attach, &philips_tiger_config, |
1151 | &dev->i2c_adap); | 1151 | &dev->i2c_adap); |
1152 | if (dev->dvb.frontend) { | 1152 | if (dev->dvb.frontend) { |
1153 | dev->dvb.frontend->ops.tuner_ops.init = philips_tiger_tuner_init; | 1153 | dev->dvb.frontend->ops.tuner_ops.init = philips_tiger_tuner_init; |
@@ -1156,7 +1156,7 @@ static int dvb_init(struct saa7134_dev *dev) | |||
1156 | } | 1156 | } |
1157 | break; | 1157 | break; |
1158 | case SAA7134_BOARD_FLYDVBT_LR301: | 1158 | case SAA7134_BOARD_FLYDVBT_LR301: |
1159 | dev->dvb.frontend = tda10046_attach(&tda827x_lifeview_config, | 1159 | dev->dvb.frontend = dvb_attach(tda10046_attach, &tda827x_lifeview_config, |
1160 | &dev->i2c_adap); | 1160 | &dev->i2c_adap); |
1161 | if (dev->dvb.frontend) { | 1161 | if (dev->dvb.frontend) { |
1162 | dev->dvb.frontend->ops.tuner_ops.init = philips_tda827x_tuner_init; | 1162 | dev->dvb.frontend->ops.tuner_ops.init = philips_tda827x_tuner_init; |
@@ -1165,7 +1165,7 @@ static int dvb_init(struct saa7134_dev *dev) | |||
1165 | } | 1165 | } |
1166 | break; | 1166 | break; |
1167 | case SAA7134_BOARD_FLYDVB_TRIO: | 1167 | case SAA7134_BOARD_FLYDVB_TRIO: |
1168 | dev->dvb.frontend = tda10046_attach(&lifeview_trio_config, | 1168 | dev->dvb.frontend = dvb_attach(tda10046_attach, &lifeview_trio_config, |
1169 | &dev->i2c_adap); | 1169 | &dev->i2c_adap); |
1170 | if (dev->dvb.frontend) { | 1170 | if (dev->dvb.frontend) { |
1171 | dev->dvb.frontend->ops.tuner_ops.sleep = lifeview_trio_tuner_sleep; | 1171 | dev->dvb.frontend->ops.tuner_ops.sleep = lifeview_trio_tuner_sleep; |
@@ -1173,7 +1173,7 @@ static int dvb_init(struct saa7134_dev *dev) | |||
1173 | } | 1173 | } |
1174 | break; | 1174 | break; |
1175 | case SAA7134_BOARD_ADS_DUO_CARDBUS_PTV331: | 1175 | case SAA7134_BOARD_ADS_DUO_CARDBUS_PTV331: |
1176 | dev->dvb.frontend = tda10046_attach(&ads_tech_duo_config, | 1176 | dev->dvb.frontend = dvb_attach(tda10046_attach, &ads_tech_duo_config, |
1177 | &dev->i2c_adap); | 1177 | &dev->i2c_adap); |
1178 | if (dev->dvb.frontend) { | 1178 | if (dev->dvb.frontend) { |
1179 | dev->dvb.frontend->ops.tuner_ops.init = ads_duo_tuner_init; | 1179 | dev->dvb.frontend->ops.tuner_ops.init = ads_duo_tuner_init; |
@@ -1182,7 +1182,7 @@ static int dvb_init(struct saa7134_dev *dev) | |||
1182 | } | 1182 | } |
1183 | break; | 1183 | break; |
1184 | case SAA7134_BOARD_TEVION_DVBT_220RF: | 1184 | case SAA7134_BOARD_TEVION_DVBT_220RF: |
1185 | dev->dvb.frontend = tda10046_attach(&tevion_dvbt220rf_config, | 1185 | dev->dvb.frontend = dvb_attach(tda10046_attach, &tevion_dvbt220rf_config, |
1186 | &dev->i2c_adap); | 1186 | &dev->i2c_adap); |
1187 | if (dev->dvb.frontend) { | 1187 | if (dev->dvb.frontend) { |
1188 | dev->dvb.frontend->ops.tuner_ops.sleep = tevion_dvb220rf_tuner_sleep; | 1188 | dev->dvb.frontend->ops.tuner_ops.sleep = tevion_dvb220rf_tuner_sleep; |
@@ -1190,7 +1190,7 @@ static int dvb_init(struct saa7134_dev *dev) | |||
1190 | } | 1190 | } |
1191 | break; | 1191 | break; |
1192 | case SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS: | 1192 | case SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS: |
1193 | dev->dvb.frontend = tda10046_attach(&ads_tech_duo_config, | 1193 | dev->dvb.frontend = dvb_attach(tda10046_attach, &ads_tech_duo_config, |
1194 | &dev->i2c_adap); | 1194 | &dev->i2c_adap); |
1195 | if (dev->dvb.frontend) { | 1195 | if (dev->dvb.frontend) { |
1196 | dev->dvb.frontend->ops.tuner_ops.init = ads_duo_tuner_init; | 1196 | dev->dvb.frontend->ops.tuner_ops.init = ads_duo_tuner_init; |
@@ -1210,15 +1210,15 @@ static int dvb_init(struct saa7134_dev *dev) | |||
1210 | #endif | 1210 | #endif |
1211 | #ifdef HAVE_NXT200X | 1211 | #ifdef HAVE_NXT200X |
1212 | case SAA7134_BOARD_AVERMEDIA_AVERTVHD_A180: | 1212 | case SAA7134_BOARD_AVERMEDIA_AVERTVHD_A180: |
1213 | dev->dvb.frontend = nxt200x_attach(&avertvhda180, &dev->i2c_adap); | 1213 | dev->dvb.frontend = dvb_attach(nxt200x_attach, &avertvhda180, &dev->i2c_adap); |
1214 | if (dev->dvb.frontend) { | 1214 | if (dev->dvb.frontend) { |
1215 | dvb_pll_attach(dev->dvb.frontend, 0x61, &dev->i2c_adap, &dvb_pll_tdhu2); | 1215 | dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61, &dev->i2c_adap, &dvb_pll_tdhu2); |
1216 | } | 1216 | } |
1217 | break; | 1217 | break; |
1218 | case SAA7134_BOARD_KWORLD_ATSC110: | 1218 | case SAA7134_BOARD_KWORLD_ATSC110: |
1219 | dev->dvb.frontend = nxt200x_attach(&kworldatsc110, &dev->i2c_adap); | 1219 | dev->dvb.frontend = dvb_attach(nxt200x_attach, &kworldatsc110, &dev->i2c_adap); |
1220 | if (dev->dvb.frontend) { | 1220 | if (dev->dvb.frontend) { |
1221 | dvb_pll_attach(dev->dvb.frontend, 0x61, &dev->i2c_adap, &dvb_pll_tuv1236d); | 1221 | dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61, &dev->i2c_adap, &dvb_pll_tuv1236d); |
1222 | } | 1222 | } |
1223 | break; | 1223 | break; |
1224 | #endif | 1224 | #endif |
diff --git a/drivers/media/video/video-buf-dvb.c b/drivers/media/video/video-buf-dvb.c index 7ee8a53cd336..376d354b27f6 100644 --- a/drivers/media/video/video-buf-dvb.c +++ b/drivers/media/video/video-buf-dvb.c | |||
@@ -223,6 +223,9 @@ fail_dmxdev: | |||
223 | fail_dmx: | 223 | fail_dmx: |
224 | dvb_unregister_frontend(dvb->frontend); | 224 | dvb_unregister_frontend(dvb->frontend); |
225 | fail_frontend: | 225 | fail_frontend: |
226 | dvb_detach(dvb->frontend->ops.release_sec, dvb->frontend); | ||
227 | dvb_detach(dvb->frontend->ops.tuner_ops.release, dvb->frontend); | ||
228 | dvb_detach(dvb->frontend->ops.release, dvb->frontend); | ||
226 | dvb_unregister_adapter(&dvb->adapter); | 229 | dvb_unregister_adapter(&dvb->adapter); |
227 | fail_adapter: | 230 | fail_adapter: |
228 | return result; | 231 | return result; |
@@ -236,6 +239,9 @@ void videobuf_dvb_unregister(struct videobuf_dvb *dvb) | |||
236 | dvb_dmxdev_release(&dvb->dmxdev); | 239 | dvb_dmxdev_release(&dvb->dmxdev); |
237 | dvb_dmx_release(&dvb->demux); | 240 | dvb_dmx_release(&dvb->demux); |
238 | dvb_unregister_frontend(dvb->frontend); | 241 | dvb_unregister_frontend(dvb->frontend); |
242 | dvb_detach(dvb->frontend->ops.release_sec, dvb->frontend); | ||
243 | dvb_detach(dvb->frontend->ops.tuner_ops.release, dvb->frontend); | ||
244 | dvb_detach(dvb->frontend->ops.release, dvb->frontend); | ||
239 | dvb_unregister_adapter(&dvb->adapter); | 245 | dvb_unregister_adapter(&dvb->adapter); |
240 | } | 246 | } |
241 | 247 | ||