diff options
Diffstat (limited to 'drivers/media/video/cx88/cx88-mpeg.c')
-rw-r--r-- | drivers/media/video/cx88/cx88-mpeg.c | 30 |
1 files changed, 4 insertions, 26 deletions
diff --git a/drivers/media/video/cx88/cx88-mpeg.c b/drivers/media/video/cx88/cx88-mpeg.c index 59164fc94f5f..b295b76737e3 100644 --- a/drivers/media/video/cx88/cx88-mpeg.c +++ b/drivers/media/video/cx88/cx88-mpeg.c | |||
@@ -787,6 +787,9 @@ static int __devinit cx8802_probe(struct pci_dev *pci_dev, | |||
787 | dev->pci = pci_dev; | 787 | dev->pci = pci_dev; |
788 | dev->core = core; | 788 | dev->core = core; |
789 | 789 | ||
790 | /* Maintain a reference so cx88-video can query the 8802 device. */ | ||
791 | core->dvbdev = dev; | ||
792 | |||
790 | err = cx8802_init_common(dev); | 793 | err = cx8802_init_common(dev); |
791 | if (err != 0) | 794 | if (err != 0) |
792 | goto fail_free; | 795 | goto fail_free; |
@@ -794,32 +797,6 @@ static int __devinit cx8802_probe(struct pci_dev *pci_dev, | |||
794 | INIT_LIST_HEAD(&dev->drvlist); | 797 | INIT_LIST_HEAD(&dev->drvlist); |
795 | list_add_tail(&dev->devlist,&cx8802_devlist); | 798 | list_add_tail(&dev->devlist,&cx8802_devlist); |
796 | 799 | ||
797 | #if defined(CONFIG_VIDEO_CX88_DVB) || defined(CONFIG_VIDEO_CX88_DVB_MODULE) | ||
798 | mutex_init(&dev->frontends.lock); | ||
799 | INIT_LIST_HEAD(&dev->frontends.felist); | ||
800 | |||
801 | if (core->board.num_frontends) { | ||
802 | struct videobuf_dvb_frontend *fe; | ||
803 | int i; | ||
804 | |||
805 | printk(KERN_INFO "%s() allocating %d frontend(s)\n", __func__, | ||
806 | core->board.num_frontends); | ||
807 | for (i = 1; i <= core->board.num_frontends; i++) { | ||
808 | fe = videobuf_dvb_alloc_frontend(&dev->frontends, i); | ||
809 | if(fe == NULL) { | ||
810 | printk(KERN_ERR "%s() failed to alloc\n", | ||
811 | __func__); | ||
812 | videobuf_dvb_dealloc_frontends(&dev->frontends); | ||
813 | err = -ENOMEM; | ||
814 | goto fail_free; | ||
815 | } | ||
816 | } | ||
817 | } | ||
818 | #endif | ||
819 | |||
820 | /* Maintain a reference so cx88-video can query the 8802 device. */ | ||
821 | core->dvbdev = dev; | ||
822 | |||
823 | /* now autoload cx88-dvb or cx88-blackbird */ | 800 | /* now autoload cx88-dvb or cx88-blackbird */ |
824 | request_modules(dev); | 801 | request_modules(dev); |
825 | return 0; | 802 | return 0; |
@@ -827,6 +804,7 @@ static int __devinit cx8802_probe(struct pci_dev *pci_dev, | |||
827 | fail_free: | 804 | fail_free: |
828 | kfree(dev); | 805 | kfree(dev); |
829 | fail_core: | 806 | fail_core: |
807 | core->dvbdev = NULL; | ||
830 | cx88_core_put(core,pci_dev); | 808 | cx88_core_put(core,pci_dev); |
831 | return err; | 809 | return err; |
832 | } | 810 | } |