aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx231xx
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/cx231xx')
-rw-r--r--drivers/media/video/cx231xx/cx231xx-cards.c8
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 56c2d8195ac6..05b65057b8a7 100644
--- a/drivers/media/video/cx231xx/cx231xx-cards.c
+++ b/drivers/media/video/cx231xx/cx231xx-cards.c
@@ -762,8 +762,14 @@ static void request_modules(struct cx231xx *dev)
762 INIT_WORK(&dev->request_module_wk, request_module_async); 762 INIT_WORK(&dev->request_module_wk, request_module_async);
763 schedule_work(&dev->request_module_wk); 763 schedule_work(&dev->request_module_wk);
764} 764}
765
766static void flush_request_modules(struct cx231xx *dev)
767{
768 flush_work_sync(&dev->request_module_wk);
769}
765#else 770#else
766#define request_modules(dev) 771#define request_modules(dev)
772#define flush_request_modules(dev)
767#endif /* CONFIG_MODULES */ 773#endif /* CONFIG_MODULES */
768 774
769/* 775/*
@@ -1096,6 +1102,8 @@ static void cx231xx_usb_disconnect(struct usb_interface *interface)
1096 if (!dev->udev) 1102 if (!dev->udev)
1097 return; 1103 return;
1098 1104
1105 flush_request_modules(dev);
1106
1099 /* delete v4l2 device */ 1107 /* delete v4l2 device */
1100 v4l2_device_unregister(&dev->v4l2_dev); 1108 v4l2_device_unregister(&dev->v4l2_dev);
1101 1109