summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2012-06-21 17:34:09 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2012-06-21 17:34:09 +0000
commit514f71287171bd37fadab3a4be7b1faf2635fc30 (patch)
tree692243fa4db88e46cbfafd1b9853b6fbb9d21863
parent3ac92a1619d7b57d7efe003cd22629e0b1a98e3c (diff)
xpp: usermode_helper() bugfix for kernels >= 3.3.0
* UMH_WAIT_PROC semantics (and value) was changed from enum to a bitmask (via #define) * This constant was missing from kernels older than 2.6.23 Signed-off-by: Oron Peled <oron.peled@xorcom.com> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10692 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r--drivers/dahdi/xpp/card_global.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/dahdi/xpp/card_global.c b/drivers/dahdi/xpp/card_global.c
index b1e1a38..997ba63 100644
--- a/drivers/dahdi/xpp/card_global.c
+++ b/drivers/dahdi/xpp/card_global.c
@@ -22,6 +22,7 @@
#include <linux/module.h>
#include <linux/delay.h>
+#include <linux/kmod.h>
#include "xdefs.h"
#include "xpd.h"
#include "xpp_dahdi.h"
@@ -674,6 +675,15 @@ static void global_packet_dump(const char *msg, xpacket_t *pack)
#define MAX_PATH_STR 128
+#ifndef UMH_WAIT_PROC
+/*
+ * - UMH_WAIT_PROC was introduced as enum in 2.6.23
+ * with a value of 1
+ * - It was changed to a macro (and it's value was modified) in 3.3.0
+ */
+#define UMH_WAIT_PROC 1
+#endif
+
int run_initialize_registers(xpd_t *xpd)
{
int ret;
@@ -764,7 +774,7 @@ int run_initialize_registers(xpd_t *xpd)
}
XPD_DBG(DEVICES, xpd, "running '%s' for type=%d revision=%d\n",
init_card, xpd->type, xbus->revision);
- ret = call_usermodehelper(init_card, argv, envp, 1);
+ ret = call_usermodehelper(init_card, argv, envp, UMH_WAIT_PROC);
/*
* Carefully report results
*/