diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2012-03-13 20:09:12 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2012-03-13 20:09:12 +0000 |
commit | 00a4ff1bd81d8f3774792539cb50712231d72bfe (patch) | |
tree | f22e2a9c145d2b8d84a5e21cce25c7e0564636ad /include | |
parent | 950b583f48e117ca3508ef973ad754e6e4b14808 (diff) |
Remove support for kernels < 2.6.18
This patch removes support for kernel versions < 2.6.18, as those are
not actively supported in any major Linux distribution (except RHEL4,
which is in the "extended" support level of the product life cycle).
This removes much of the more #ifdef-rich parts of the code.
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Acked-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10472 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'include')
-rw-r--r-- | include/dahdi/dahdi_config.h | 5 | ||||
-rw-r--r-- | include/dahdi/kernel.h | 74 |
2 files changed, 0 insertions, 79 deletions
diff --git a/include/dahdi/dahdi_config.h b/include/dahdi/dahdi_config.h index 56902e1..0957689 100644 --- a/include/dahdi/dahdi_config.h +++ b/include/dahdi/dahdi_config.h @@ -21,9 +21,6 @@ #ifdef __KERNEL__ #include <linux/version.h> -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) -#include <linux/config.h> -#endif #endif /* DAHDI compile time options */ @@ -76,10 +73,8 @@ /* You can still override them below */ #if defined(CONFIG_HDLC) || defined(CONFIG_HDLC_MODULE) #define DAHDI_HDLC_TYPE_TRANS -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,3) #define HDLC_MAINTAINERS_ARE_MORE_STUPID_THAN_I_THOUGHT #endif -#endif /* * Uncomment CONFIG_DAHDI_NET to enable SyncPPP, CiscoHDLC, and Frame Relay diff --git a/include/dahdi/kernel.h b/include/dahdi/kernel.h index 882d31e..ec7f90b 100644 --- a/include/dahdi/kernel.h +++ b/include/dahdi/kernel.h @@ -38,9 +38,6 @@ #include <dahdi/dahdi_config.h> #include <linux/version.h> -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) -#include <linux/config.h> -#endif #include <linux/fs.h> #include <linux/device.h> #include <linux/module.h> @@ -60,11 +57,7 @@ #include <linux/poll.h> -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10) #define dahdi_pci_module pci_register_driver -#else -#define dahdi_pci_module pci_module_init -#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19) #define DAHDI_IRQ_HANDLER(a) static irqreturn_t a(int irq, void *dev_id) @@ -76,22 +69,9 @@ #define HAVE_NET_DEVICE_OPS #endif -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) #define DAHDI_IRQ_SHARED IRQF_SHARED #define DAHDI_IRQ_DISABLED IRQF_DISABLED #define DAHDI_IRQ_SHARED_DISABLED IRQF_SHARED | IRQF_DISABLED -#else -#define DAHDI_IRQ_SHARED SA_SHIRQ -#define DAHDI_IRQ_DISABLED SA_INTERRUPT -#define DAHDI_IRQ_SHARED_DISABLED SA_SHIRQ | SA_INTERRUPT -#endif - -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) -#ifndef dev_notice -#define dev_notice(dev, format, arg...) \ - dev_printk(KERN_NOTICE , dev , format , ## arg) -#endif -#endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26) # ifdef RHEL_RELEASE_VERSION @@ -1409,60 +1389,6 @@ static inline int strcasecmp(const char *s1, const char *s2) return c1 - c2; } #endif /* clamp_val */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18) -static inline void list_replace(struct list_head *old, struct list_head *new) -{ - new->next = old->next; - new->next->prev = new; - new->prev = old->prev; - new->prev->next = new; -} - -#ifndef WARN_ON_ONCE -#define WARN_ON_ONCE(__condition) do { \ - static int __once = 1; \ - if (unlikely(__condition)) { \ - if (__once) { \ - __once = 0; \ - WARN_ON(0); \ - } \ - } \ -} while (0) -#endif - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 17) -#ifndef POLLRDHUP -#define POLLRDHUP 0 -#endif - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 14) -#define kzalloc(a, b) kcalloc(1, a, b) -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 12) -#define synchronize_rcu() synchronize_kernel() -#define kasprintf dahdi_kasprintf -char *dahdi_kasprintf(gfp_t gfp, const char *fmt, ...); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 11) -#if !defined(HAVE_WAIT_FOR_COMPLETION_TIMEOUT) -static inline unsigned long -wait_for_completion_interruptible_timeout(struct completion *x, - unsigned long timeout) -{ - /* There is a race condition here. If x->done is reset to 0 - * before the call to wait_for_completion after this thread wakes. - */ - timeout = wait_event_interruptible_timeout(x->wait, x->done, timeout); - if (timeout) - wait_for_completion(x); - - return timeout; -} -#endif -typedef u32 __bitwise pm_message_t; -#endif /* 2.6.11 */ -#endif /* 2.6.12 */ -#endif /* 2.6.14 */ -#endif /* 2.6.17 */ -#endif /* 2.6.18 */ #endif /* 2.6.22 */ #endif /* 2.6.25 */ #endif /* 2.6.26 */ |