diff options
Diffstat (limited to 'drivers/media/video/cx231xx/cx231xx-cards.c')
-rw-r--r-- | drivers/media/video/cx231xx/cx231xx-cards.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/media/video/cx231xx/cx231xx-cards.c b/drivers/media/video/cx231xx/cx231xx-cards.c index 6905607ffca3..588f3e8f028b 100644 --- a/drivers/media/video/cx231xx/cx231xx-cards.c +++ b/drivers/media/video/cx231xx/cx231xx-cards.c | |||
@@ -813,8 +813,14 @@ static void request_modules(struct cx231xx *dev) | |||
813 | INIT_WORK(&dev->request_module_wk, request_module_async); | 813 | INIT_WORK(&dev->request_module_wk, request_module_async); |
814 | schedule_work(&dev->request_module_wk); | 814 | schedule_work(&dev->request_module_wk); |
815 | } | 815 | } |
816 | |||
817 | static void flush_request_modules(struct cx231xx *dev) | ||
818 | { | ||
819 | flush_work_sync(&dev->request_module_wk); | ||
820 | } | ||
816 | #else | 821 | #else |
817 | #define request_modules(dev) | 822 | #define request_modules(dev) |
823 | #define flush_request_modules(dev) | ||
818 | #endif /* CONFIG_MODULES */ | 824 | #endif /* CONFIG_MODULES */ |
819 | 825 | ||
820 | /* | 826 | /* |
@@ -1147,6 +1153,8 @@ static void cx231xx_usb_disconnect(struct usb_interface *interface) | |||
1147 | if (!dev->udev) | 1153 | if (!dev->udev) |
1148 | return; | 1154 | return; |
1149 | 1155 | ||
1156 | flush_request_modules(dev); | ||
1157 | |||
1150 | /* delete v4l2 device */ | 1158 | /* delete v4l2 device */ |
1151 | v4l2_device_unregister(&dev->v4l2_dev); | 1159 | v4l2_device_unregister(&dev->v4l2_dev); |
1152 | 1160 | ||