From e9d699a807e33ba3571cf9e0ca9964cb7940c8ea Mon Sep 17 00:00:00 2001 From: David Schleef Date: Tue, 5 Aug 2003 03:34:04 +0000 Subject: [PATCH] Backport Frank's 2.6 changes to 2.4 --- include/linux/comedi_rt.h | 2 +- include/linux/interrupt.h | 2 +- include/linux/module.h | 31 ++++++++++++++++--------------- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/include/linux/comedi_rt.h b/include/linux/comedi_rt.h index 42140c5a..9609f884 100644 --- a/include/linux/comedi_rt.h +++ b/include/linux/comedi_rt.h @@ -55,7 +55,7 @@ #define rt_printk printk #endif -int comedi_request_irq(unsigned int irq,void (*handler)(int,void *, +int comedi_request_irq(unsigned int irq,irqreturn_t (*handler)(int,void *, struct pt_regs *regs),unsigned long flags,const char *device, comedi_device *dev_id); void comedi_free_irq(unsigned int irq,comedi_device *dev_id); diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 8daf83c6..5f0359a3 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h @@ -25,7 +25,7 @@ typedef void irqreturn_t; #define IRQ_NONE #define IRQ_HANDLED -#define IRQ_RETVAL(x) +#define IRQ_RETVAL(x) (void)(x) #endif #include_next diff --git a/include/linux/module.h b/include/linux/module.h index 9dccf59e..e84413fe 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -7,21 +7,6 @@ #include -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) -static inline int try_module_get(struct module *module) -{ - if( module == NULL ) return 1; - __MOD_INC_USE_COUNT( module ); - return 1; -} -static inline void module_put(struct module *module) -{ - if( module == NULL ) return; - __MOD_DEC_USE_COUNT( module ) -} -#else -#define MOD_IN_USE (0) -#endif #if LINUX_VERSION_CODE < 0x020115 #define MODULE_AUTHOR(a) @@ -76,6 +61,22 @@ static inline void module_put(struct module *module) #include_next +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) +static inline int try_module_get(struct module *module) +{ + if( module == NULL ) return 1; + __MOD_INC_USE_COUNT( module ); + return 1; +} +static inline void module_put(struct module *module) +{ + if( module == NULL ) return; + __MOD_DEC_USE_COUNT( module ); +} +#else +#define MOD_IN_USE (0) +#endif + #endif /* _COMPAT_MODULE_H */ -- 2.26.2