summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2008-08-20 21:22:12 +0000
committerKevin P. Fleming <kpfleming@digium.com>2008-08-20 21:22:12 +0000
commite3ccd80d0fe4bfc7439d1f2fb6f73c7b86ab13e8 (patch)
treefd098a72026fa37c2c43dee7f70a9d92ed1ca3b4
parentc97ed60af4545c6d4e6099eea18fd5c429b4126c (diff)
improve compatibility with 2.6.26 and 2.6.27 kernels
(closes issue #13253) Reported by: raiden Patches: zap-dev.patch uploaded by smurfix on issue #13277 (license 547) zap-sema.patch uploaded by smurfix on issue #13277 (license 547) git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4801 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r--drivers/dahdi/dahdi-base.c5
-rw-r--r--drivers/dahdi/wctdm24xxp/GpakApi.c4
-rw-r--r--drivers/dahdi/wctdm24xxp/GpakCust.c4
-rw-r--r--drivers/dahdi/wctdm24xxp/base.c4
-rw-r--r--drivers/dahdi/wctdm24xxp/wctdm24xxp.h5
-rw-r--r--drivers/dahdi/wcte12xp/vpmadt032.c5
-rw-r--r--drivers/dahdi/xpp/xpd.h5
7 files changed, 31 insertions, 1 deletions
diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c
index 1cdf3df..c563d55 100644
--- a/drivers/dahdi/dahdi-base.c
+++ b/drivers/dahdi/dahdi-base.c
@@ -152,7 +152,10 @@ EXPORT_SYMBOL(dahdi_set_hpec_ioctl);
static struct proc_dir_entry *proc_entries[DAHDI_MAX_SPANS];
#endif
-#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)
diff --git a/drivers/dahdi/wctdm24xxp/GpakApi.c b/drivers/dahdi/wctdm24xxp/GpakApi.c
index 976c90d..45825fb 100644
--- a/drivers/dahdi/wctdm24xxp/GpakApi.c
+++ b/drivers/dahdi/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 <dahdi/kernel.h>
diff --git a/drivers/dahdi/wctdm24xxp/GpakCust.c b/drivers/dahdi/wctdm24xxp/GpakCust.c
index a9245db..95c5f8e 100644
--- a/drivers/dahdi/wctdm24xxp/GpakCust.c
+++ b/drivers/dahdi/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 <dahdi/kernel.h>
diff --git a/drivers/dahdi/wctdm24xxp/base.c b/drivers/dahdi/wctdm24xxp/base.c
index b4cf9fd..ff06be0 100644
--- a/drivers/dahdi/wctdm24xxp/base.c
+++ b/drivers/dahdi/wctdm24xxp/base.c
@@ -45,7 +45,11 @@ Tx Gain - W/Pre-Emphasis: -23.99 to 0.00 db
#include <linux/workqueue.h>
#include <linux/delay.h>
#include <linux/moduleparam.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+#include <linux/semaphore.h>
+#else
#include <asm/semaphore.h>
+#endif
#include <dahdi/kernel.h>
#include <dahdi/wctdm_user.h>
diff --git a/drivers/dahdi/wctdm24xxp/wctdm24xxp.h b/drivers/dahdi/wctdm24xxp/wctdm24xxp.h
index 85a6e1f..3974a57 100644
--- a/drivers/dahdi/wctdm24xxp/wctdm24xxp.h
+++ b/drivers/dahdi/wctdm24xxp/wctdm24xxp.h
@@ -29,7 +29,12 @@
#include <dahdi/kernel.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/drivers/dahdi/wcte12xp/vpmadt032.c b/drivers/dahdi/wcte12xp/vpmadt032.c
index 4f54814..e8df9e6 100644
--- a/drivers/dahdi/wcte12xp/vpmadt032.c
+++ b/drivers/dahdi/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/drivers/dahdi/xpp/xpd.h b/drivers/dahdi/xpp/xpd.h
index ae87360..2e89adb 100644
--- a/drivers/dahdi/xpp/xpd.h
+++ b/drivers/dahdi/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