summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2010-02-25 22:16:40 +0000
committerShaun Ruffell <sruffell@digium.com>2010-02-25 22:16:40 +0000
commit00d2851a04a8f7fc4a34b91d2c9455748f973ca9 (patch)
treead0b3867aebe80e1152acc355b7a0aea0eeae1c0
parentff5892a19ef62965b4334107d894796ee8d4a1d5 (diff)
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
-rw-r--r--drivers/dahdi/voicebus/voicebus.c4
1 files changed, 4 insertions, 0 deletions
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;