Return-path: Received: from server19320154104.serverpool.info ([193.201.54.104]:44977 "EHLO hauke-m.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751747Ab2HBQ2J (ORCPT ); Thu, 2 Aug 2012 12:28:09 -0400 From: Hauke Mehrtens To: mcgrof@gmail.com Cc: linux-wireless@vger.kernel.org, Hauke Mehrtens Subject: [PATCH 1/2] compat: remove backport of irq_modify_status Date: Thu, 2 Aug 2012 18:28:00 +0200 Message-Id: <1343924881-31418-1-git-send-email-hauke@hauke-m.de> (sfid-20120802_182813_270007_79C32F7A) Sender: linux-wireless-owner@vger.kernel.org List-ID: 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 --- 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 d2ee109..24b267a 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 b87aa2f..7e14853 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) { -- 1.7.9.5