From 67ccbfd69e20856ce41d6b046bb39ea7141040d6 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Thu, 2 Aug 2012 18:28:00 +0200 Subject: [PATCH] compat: remove backport of irq_modify_status Only kernel >= 2.6.39 irq_to_desc or irq_desc are exporting, so that compat is not able to access this on the kernel versions where it is needed. irq_to_desc and irq_desc are defined in the header files so compilation works, but the module is not loadable because of the missing exported symbol which make compat unusable on all these kernel versions. Remove this function, no driver seams to need it. Signed-off-by: Hauke Mehrtens Signed-off-by: Luis R. Rodriguez --- compat/compat-2.6.37.c | 26 -------------------------- include/linux/compat-2.6.37.h | 21 --------------------- 2 files changed, 47 deletions(-) diff --git a/compat/compat-2.6.37.c b/compat/compat-2.6.37.c index d2ee1095933f..24b267a5be5c 100644 --- a/compat/compat-2.6.37.c +++ b/compat/compat-2.6.37.c @@ -13,32 +13,6 @@ #include #include #include -#include -#include -#include - -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,27) -#define irq_to_desc(irq) (irq_desc + irq) -#endif - -void irq_modify_status(unsigned int irq, unsigned long clr, unsigned long set) -{ - struct irq_desc *desc = irq_to_desc(irq); - unsigned long flags; - - if (!desc) - return; - - /* Sanitize flags */ - set &= IRQF_MODIFY_MASK; - clr &= IRQF_MODIFY_MASK; - - spin_lock_irqsave(&desc->lock, flags); - desc->status &= ~clr; - desc->status |= set; - spin_unlock_irqrestore(&desc->lock, flags); -} -EXPORT_SYMBOL_GPL(irq_modify_status); #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) static const void *net_current_ns(void) diff --git a/include/linux/compat-2.6.37.h b/include/linux/compat-2.6.37.h index b87aa2f03f5d..7e14853bccb7 100644 --- a/include/linux/compat-2.6.37.h +++ b/include/linux/compat-2.6.37.h @@ -9,27 +9,6 @@ #include #include #include -#include - -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)) -#define IRQ_MOVE_PCNTXT 0x01000000 /* IRQ migration from process context */ -#endif - -#define IRQF_MODIFY_MASK \ - (IRQ_TYPE_SENSE_MASK | IRQ_NOPROBE | IRQ_NOREQUEST | \ - IRQ_NOAUTOEN | IRQ_MOVE_PCNTXT | IRQ_LEVEL) - -void irq_modify_status(unsigned int irq, unsigned long clr, unsigned long set); - -static inline void irq_set_status_flags(unsigned int irq, unsigned long set) -{ - irq_modify_status(irq, 0, set); -} - -static inline void irq_clear_status_flags(unsigned int irq, unsigned long clr) -{ - irq_modify_status(irq, clr, 0); -} static inline int proto_ports_offset(int proto) { -- 2.30.2