summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx18/cx18-driver.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2010-01-28 03:19:00 +0100
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-02-26 19:10:48 +0100
commit583d338ddda291e3244c7f3a785973c51dcce84e (patch)
treea1e066ed696a369cc21d418de46ad6dc2b40f4bb /drivers/media/video/cx18/cx18-driver.c
parentV4L/DVB: gspca - sq905c: Fix a compilation warning (diff)
downloadlinux-583d338ddda291e3244c7f3a785973c51dcce84e.tar.xz
linux-583d338ddda291e3244c7f3a785973c51dcce84e.zip
cx18: Fix compilation when CONFIG_MODULE is disabled
drivers/media/video/cx18/cx18-driver.c:252: warning: ‘request_modules’ used but never defined Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx18/cx18-driver.c')
-rw-r--r--drivers/media/video/cx18/cx18-driver.c45
1 files changed, 21 insertions, 24 deletions
diff --git a/drivers/media/video/cx18/cx18-driver.c b/drivers/media/video/cx18/cx18-driver.c
index cbd4f85da76b..c95a86ba33b0 100644
--- a/drivers/media/video/cx18/cx18-driver.c
+++ b/drivers/media/video/cx18/cx18-driver.c
@@ -248,8 +248,27 @@ MODULE_LICENSE("GPL");
MODULE_VERSION(CX18_VERSION);
-/* Forward Declaration */
-static void request_modules(struct cx18 *dev);
+#if defined(CONFIG_MODULES) && defined(MODULE)
+static void request_module_async(struct work_struct *work)
+{
+ struct cx18 *dev = container_of(work, struct cx18, request_module_wk);
+
+ /* Make sure cx18-alsa module is loaded */
+ request_module("cx18-alsa");
+
+ /* Initialize cx18-alsa for this instance of the cx18 device */
+ if (cx18_ext_init != NULL)
+ cx18_ext_init(dev);
+}
+
+static void request_modules(struct cx18 *dev)
+{
+ INIT_WORK(&dev->request_module_wk, request_module_async);
+ schedule_work(&dev->request_module_wk);
+}
+#else
+#define request_modules(dev)
+#endif /* CONFIG_MODULES */
/* Generic utility functions */
int cx18_msleep_timeout(unsigned int msecs, int intr)
@@ -1250,28 +1269,6 @@ static void cx18_remove(struct pci_dev *pci_dev)
}
-#if defined(CONFIG_MODULES) && defined(MODULE)
-static void request_module_async(struct work_struct *work)
-{
- struct cx18 *dev = container_of(work, struct cx18, request_module_wk);
-
- /* Make sure cx18-alsa module is loaded */
- request_module("cx18-alsa");
-
- /* Initialize cx18-alsa for this instance of the cx18 device */
- if (cx18_ext_init != NULL)
- cx18_ext_init(dev);
-}
-
-static void request_modules(struct cx18 *dev)
-{
- INIT_WORK(&dev->request_module_wk, request_module_async);
- schedule_work(&dev->request_module_wk);
-}
-#else
-#define request_modules(dev)
-#endif /* CONFIG_MODULES */
-
/* define a pci_driver for card detection */
static struct pci_driver cx18_pci_driver = {
.name = "cx18",