aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx18/cx18-driver.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2010-01-27 21:19:00 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-02-26 13:10:48 -0500
commit583d338ddda291e3244c7f3a785973c51dcce84e (patch)
treea1e066ed696a369cc21d418de46ad6dc2b40f4bb /drivers/media/video/cx18/cx18-driver.c
parent914e8713f22fc01da14670c1647603edcb7c7b0a (diff)
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");
248 248
249MODULE_VERSION(CX18_VERSION); 249MODULE_VERSION(CX18_VERSION);
250 250
251/* Forward Declaration */ 251#if defined(CONFIG_MODULES) && defined(MODULE)
252static void request_modules(struct cx18 *dev); 252static void request_module_async(struct work_struct *work)
253{
254 struct cx18 *dev = container_of(work, struct cx18, request_module_wk);
255
256 /* Make sure cx18-alsa module is loaded */
257 request_module("cx18-alsa");
258
259 /* Initialize cx18-alsa for this instance of the cx18 device */
260 if (cx18_ext_init != NULL)
261 cx18_ext_init(dev);
262}
263
264static void request_modules(struct cx18 *dev)
265{
266 INIT_WORK(&dev->request_module_wk, request_module_async);
267 schedule_work(&dev->request_module_wk);
268}
269#else
270#define request_modules(dev)
271#endif /* CONFIG_MODULES */
253 272
254/* Generic utility functions */ 273/* Generic utility functions */
255int cx18_msleep_timeout(unsigned int msecs, int intr) 274int cx18_msleep_timeout(unsigned int msecs, int intr)
@@ -1250,28 +1269,6 @@ static void cx18_remove(struct pci_dev *pci_dev)
1250} 1269}
1251 1270
1252 1271
1253#if defined(CONFIG_MODULES) && defined(MODULE)
1254static void request_module_async(struct work_struct *work)
1255{
1256 struct cx18 *dev = container_of(work, struct cx18, request_module_wk);
1257
1258 /* Make sure cx18-alsa module is loaded */
1259 request_module("cx18-alsa");
1260
1261 /* Initialize cx18-alsa for this instance of the cx18 device */
1262 if (cx18_ext_init != NULL)
1263 cx18_ext_init(dev);
1264}
1265
1266static void request_modules(struct cx18 *dev)
1267{
1268 INIT_WORK(&dev->request_module_wk, request_module_async);
1269 schedule_work(&dev->request_module_wk);
1270}
1271#else
1272#define request_modules(dev)
1273#endif /* CONFIG_MODULES */
1274
1275/* define a pci_driver for card detection */ 1272/* define a pci_driver for card detection */
1276static struct pci_driver cx18_pci_driver = { 1273static struct pci_driver cx18_pci_driver = {
1277 .name = "cx18", 1274 .name = "cx18",