From 00d2851a04a8f7fc4a34b91d2c9455748f973ca9 Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Thu, 25 Feb 2010 22:16:40 +0000 Subject: voicebus: Only use request_module_nowait on kernels >= 2.6.30. Request_module_nowait is only useful when asynchronous initialization is used (committed to trunk in r8094), and that can only happen in kernel version after 2.6.30. Some earlier kernels do not have the request_module_nowait interface. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8111 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/voicebus/voicebus.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/dahdi/voicebus/voicebus.c b/drivers/dahdi/voicebus/voicebus.c index 7bc6a65..869cec0 100644 --- a/drivers/dahdi/voicebus/voicebus.c +++ b/drivers/dahdi/voicebus/voicebus.c @@ -1569,12 +1569,16 @@ int vpmadtreg_loadfirmware(struct voicebus *vb) spin_unlock(&loader_list_lock); if (!loader_present) { +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30) + ret = request_module("dahdi_vpmadt032_loader"); +#else /* If we use the blocking 'request_module' here and we are * loading the client boards with async_schedule we will hang * here. The module loader will wait for our asynchronous tasks * to finish, but we can't because we're waiting for the load * the finish. */ ret = request_module_nowait("dahdi_vpmadt032_loader"); +#endif if (ret) return ret; stop = jiffies + HZ; -- cgit v1.2.3