From: Ian Abbott Date: Fri, 18 Apr 2008 13:40:09 +0000 (+0000) Subject: Added __module_get() compatibility (just in case we ever support 2.4.x X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=28220bd9dc0137d0ff29a428025e6a25b76bc05b;p=comedi.git Added __module_get() compatibility (just in case we ever support 2.4.x kernels again!). --- diff --git a/include/linux/module.h b/include/linux/module.h index 6d4f4fca..fe29b96d 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -17,7 +17,7 @@ #include_next -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,48) static inline int try_module_get(struct module *module) { if (!module) @@ -31,7 +31,14 @@ static inline void module_put(struct module *module) return; __MOD_DEC_USE_COUNT(module); } -#else +#endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,69) +static inline void __module_get(struct module *module) +{ + (void)try_module_get(module); +} +#endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,59) #define MOD_IN_USE (0) #endif