summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2008-08-20 21:16:40 +0000
committerkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2008-08-20 21:16:40 +0000
commit252bd2c93858654d6af5ebca0ed6704f1c14401a (patch)
tree8cc52beb1765d3b6131ab36738dd36fe5aa58223
parent641e8ab0966ece7252a84e4f943b018991d8f936 (diff)
improve compatibility with 2.6.26 and 2.6.27 kernels
(closes issue #13277) Reported by: smurfix Patches: zap-dev.patch uploaded by smurfix (license 547) zap-sema.patch uploaded by smurfix (license 547) git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@4496 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rw-r--r--kernel/wctdm24xxp/GpakApi.c4
-rw-r--r--kernel/wctdm24xxp/GpakCust.c4
-rw-r--r--kernel/wctdm24xxp/base.c4
-rw-r--r--kernel/wctdm24xxp/wctdm24xxp.h5
-rw-r--r--kernel/wcte12xp/vpmadt032.c5
-rw-r--r--kernel/xpp/xpd.h5
-rw-r--r--kernel/zaptel-base.c5
7 files changed, 31 insertions, 1 deletions
diff --git a/kernel/wctdm24xxp/GpakApi.c b/kernel/wctdm24xxp/GpakApi.c
index 151a3a6..78d0681 100644
--- a/kernel/wctdm24xxp/GpakApi.c
+++ b/kernel/wctdm24xxp/GpakApi.c
@@ -33,7 +33,11 @@
*/
#include <linux/version.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+#include <linux/semaphore.h>
+#else
#include <asm/semaphore.h>
+#endif
#include "zaptel.h"
diff --git a/kernel/wctdm24xxp/GpakCust.c b/kernel/wctdm24xxp/GpakCust.c
index 4245eab..fe29458 100644
--- a/kernel/wctdm24xxp/GpakCust.c
+++ b/kernel/wctdm24xxp/GpakCust.c
@@ -35,7 +35,11 @@
#include <linux/version.h>
#include <linux/delay.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+#include <linux/semaphore.h>
+#else
#include <asm/semaphore.h>
+#endif
#include "zaptel.h"
#include "wctdm24xxp.h"
diff --git a/kernel/wctdm24xxp/base.c b/kernel/wctdm24xxp/base.c
index a69f13c..aff2dcc 100644
--- a/kernel/wctdm24xxp/base.c
+++ b/kernel/wctdm24xxp/base.c
@@ -44,7 +44,11 @@ Tx Gain - W/Pre-Emphasis: -23.99 to 0.00 db
#include <linux/interrupt.h>
#include <linux/workqueue.h>
#include <linux/delay.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+#include <linux/semaphore.h>
+#else
#include <asm/semaphore.h>
+#endif
#ifdef LINUX26
#include <linux/moduleparam.h>
diff --git a/kernel/wctdm24xxp/wctdm24xxp.h b/kernel/wctdm24xxp/wctdm24xxp.h
index b90f293..1d41e30 100644
--- a/kernel/wctdm24xxp/wctdm24xxp.h
+++ b/kernel/wctdm24xxp/wctdm24xxp.h
@@ -28,7 +28,12 @@
#include "../zaptel.h"
#include "../voicebus.h"
+#include <linux/version.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+#include <linux/semaphore.h>
+#else
#include <asm/semaphore.h>
+#endif
#define NUM_FXO_REGS 60
diff --git a/kernel/wcte12xp/vpmadt032.c b/kernel/wcte12xp/vpmadt032.c
index dcd88e0..e989b9b 100644
--- a/kernel/wcte12xp/vpmadt032.c
+++ b/kernel/wcte12xp/vpmadt032.c
@@ -28,7 +28,12 @@
*/
#include <linux/delay.h>
+#include <linux/version.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+#include <linux/semaphore.h>
+#else
#include <asm/semaphore.h>
+#endif
#include <linux/pci.h>
#include <linux/firmware.h>
#include <linux/list.h>
diff --git a/kernel/xpp/xpd.h b/kernel/xpp/xpd.h
index e556ef0..35688d6 100644
--- a/kernel/xpp/xpd.h
+++ b/kernel/xpp/xpd.h
@@ -29,8 +29,13 @@
#ifdef __KERNEL__
#include <linux/kernel.h>
#include <linux/device.h>
+#include <linux/version.h>
#include <asm/atomic.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+#include <linux/semaphore.h>
+#else
#include <asm/semaphore.h>
+#endif
#include <linux/moduleparam.h>
#ifdef XPP_DEBUGFS
#ifndef CONFIG_DEBUG_FS
diff --git a/kernel/zaptel-base.c b/kernel/zaptel-base.c
index deeb01c..d2e5eb7 100644
--- a/kernel/zaptel-base.c
+++ b/kernel/zaptel-base.c
@@ -162,7 +162,10 @@ static devfs_handle_t timer;
/* udev necessary data structures. Yeah! */
#ifdef CONFIG_ZAP_UDEV
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
+#define CLASS_DEV_CREATE(class, devt, device, name) \
+ device_create(class, device, devt, NULL, "%s", name)
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
#define CLASS_DEV_CREATE(class, devt, device, name) \
device_create(class, device, devt, name)
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)