diff options
Diffstat (limited to 'drivers/media/video/cx88/cx88-mpeg.c')
-rw-r--r-- | drivers/media/video/cx88/cx88-mpeg.c | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/drivers/media/video/cx88/cx88-mpeg.c b/drivers/media/video/cx88/cx88-mpeg.c index 1fe1a833c7c7..b2eb32e01aee 100644 --- a/drivers/media/video/cx88/cx88-mpeg.c +++ b/drivers/media/video/cx88/cx88-mpeg.c | |||
@@ -49,6 +49,27 @@ MODULE_PARM_DESC(debug,"enable debug messages [mpeg]"); | |||
49 | #define mpeg_dbg(level,fmt, arg...) if (debug >= level) \ | 49 | #define mpeg_dbg(level,fmt, arg...) if (debug >= level) \ |
50 | printk(KERN_DEBUG "%s/2-mpeg: " fmt, core->name, ## arg) | 50 | printk(KERN_DEBUG "%s/2-mpeg: " fmt, core->name, ## arg) |
51 | 51 | ||
52 | #if defined(CONFIG_MODULES) && defined(MODULE) | ||
53 | static void request_module_async(struct work_struct *work) | ||
54 | { | ||
55 | struct cx8802_dev *dev=container_of(work, struct cx8802_dev, request_module_wk); | ||
56 | |||
57 | if (cx88_boards[dev->core->board].mpeg & CX88_MPEG_DVB) | ||
58 | request_module("cx88-dvb"); | ||
59 | if (cx88_boards[dev->core->board].mpeg & CX88_MPEG_BLACKBIRD) | ||
60 | request_module("cx88-blackbird"); | ||
61 | } | ||
62 | |||
63 | static void request_modules(struct cx8802_dev *dev) | ||
64 | { | ||
65 | INIT_WORK(&dev->request_module_wk, request_module_async); | ||
66 | schedule_work(&dev->request_module_wk); | ||
67 | } | ||
68 | #else | ||
69 | #define request_modules(dev) | ||
70 | #endif /* CONFIG_MODULES */ | ||
71 | |||
72 | |||
52 | static LIST_HEAD(cx8802_devlist); | 73 | static LIST_HEAD(cx8802_devlist); |
53 | /* ------------------------------------------------------------------ */ | 74 | /* ------------------------------------------------------------------ */ |
54 | 75 | ||
@@ -345,7 +366,8 @@ static void cx8802_mpeg_irq(struct cx8802_dev *dev) | |||
345 | 366 | ||
346 | if (debug || (status & mask & ~0xff)) | 367 | if (debug || (status & mask & ~0xff)) |
347 | cx88_print_irqbits(core->name, "irq mpeg ", | 368 | cx88_print_irqbits(core->name, "irq mpeg ", |
348 | cx88_mpeg_irqs, status, mask); | 369 | cx88_mpeg_irqs, ARRAY_SIZE(cx88_mpeg_irqs), |
370 | status, mask); | ||
349 | 371 | ||
350 | /* risc op code error */ | 372 | /* risc op code error */ |
351 | if (status & (1 << 16)) { | 373 | if (status & (1 << 16)) { |
@@ -427,7 +449,7 @@ int cx8802_init_common(struct cx8802_dev *dev) | |||
427 | if (pci_enable_device(dev->pci)) | 449 | if (pci_enable_device(dev->pci)) |
428 | return -EIO; | 450 | return -EIO; |
429 | pci_set_master(dev->pci); | 451 | pci_set_master(dev->pci); |
430 | if (!pci_dma_supported(dev->pci,0xffffffff)) { | 452 | if (!pci_dma_supported(dev->pci,DMA_32BIT_MASK)) { |
431 | printk("%s/2: Oops: no 32bit PCI DMA ???\n",dev->core->name); | 453 | printk("%s/2: Oops: no 32bit PCI DMA ???\n",dev->core->name); |
432 | return -EIO; | 454 | return -EIO; |
433 | } | 455 | } |
@@ -778,6 +800,9 @@ static int __devinit cx8802_probe(struct pci_dev *pci_dev, | |||
778 | 800 | ||
779 | /* Maintain a reference so cx88-video can query the 8802 device. */ | 801 | /* Maintain a reference so cx88-video can query the 8802 device. */ |
780 | core->dvbdev = dev; | 802 | core->dvbdev = dev; |
803 | |||
804 | /* now autoload cx88-dvb or cx88-blackbird */ | ||
805 | request_modules(dev); | ||
781 | return 0; | 806 | return 0; |
782 | 807 | ||
783 | fail_free: | 808 | fail_free: |