From 28220bd9dc0137d0ff29a428025e6a25b76bc05b Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Fri, 18 Apr 2008 13:40:09 +0000 Subject: [PATCH] Added __module_get() compatibility (just in case we ever support 2.4.x kernels again!). --- include/linux/module.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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 -- 2.26.2