diff options
Diffstat (limited to 'drivers/media/video/bt8xx/bttv-driver.c')
-rw-r--r-- | drivers/media/video/bt8xx/bttv-driver.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c index a529619e51f6..53285aa6e72c 100644 --- a/drivers/media/video/bt8xx/bttv-driver.c +++ b/drivers/media/video/bt8xx/bttv-driver.c | |||
@@ -189,8 +189,14 @@ static void request_modules(struct bttv *dev) | |||
189 | INIT_WORK(&dev->request_module_wk, request_module_async); | 189 | INIT_WORK(&dev->request_module_wk, request_module_async); |
190 | schedule_work(&dev->request_module_wk); | 190 | schedule_work(&dev->request_module_wk); |
191 | } | 191 | } |
192 | |||
193 | static void flush_request_modules(struct bttv *dev) | ||
194 | { | ||
195 | flush_work_sync(&dev->request_module_wk); | ||
196 | } | ||
192 | #else | 197 | #else |
193 | #define request_modules(dev) | 198 | #define request_modules(dev) |
199 | #define flush_request_modules(dev) | ||
194 | #endif /* CONFIG_MODULES */ | 200 | #endif /* CONFIG_MODULES */ |
195 | 201 | ||
196 | 202 | ||
@@ -4573,6 +4579,9 @@ static void __devexit bttv_remove(struct pci_dev *pci_dev) | |||
4573 | if (bttv_verbose) | 4579 | if (bttv_verbose) |
4574 | printk("bttv%d: unloading\n",btv->c.nr); | 4580 | printk("bttv%d: unloading\n",btv->c.nr); |
4575 | 4581 | ||
4582 | if (bttv_tvcards[btv->c.type].has_dvb) | ||
4583 | flush_request_modules(btv); | ||
4584 | |||
4576 | /* shutdown everything (DMA+IRQs) */ | 4585 | /* shutdown everything (DMA+IRQs) */ |
4577 | btand(~15, BT848_GPIO_DMA_CTL); | 4586 | btand(~15, BT848_GPIO_DMA_CTL); |
4578 | btwrite(0, BT848_INT_MASK); | 4587 | btwrite(0, BT848_INT_MASK); |