aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/module.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/module.h')
-rw-r--r--include/linux/module.h21
1 files changed, 9 insertions, 12 deletions
diff --git a/include/linux/module.h b/include/linux/module.h
index d1d00ce8f4ed..10f771a49997 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -6,7 +6,6 @@
6 * Rewritten by Richard Henderson <rth@tamu.edu> Dec 1996 6 * Rewritten by Richard Henderson <rth@tamu.edu> Dec 1996
7 * Rewritten again by Rusty Russell, 2002 7 * Rewritten again by Rusty Russell, 2002
8 */ 8 */
9#include <linux/sched.h>
10#include <linux/spinlock.h> 9#include <linux/spinlock.h>
11#include <linux/list.h> 10#include <linux/list.h>
12#include <linux/stat.h> 11#include <linux/stat.h>
@@ -264,6 +263,7 @@ struct module
264 struct module_attribute *modinfo_attrs; 263 struct module_attribute *modinfo_attrs;
265 const char *version; 264 const char *version;
266 const char *srcversion; 265 const char *srcversion;
266 struct kobject *drivers_dir;
267 267
268 /* Exported symbols */ 268 /* Exported symbols */
269 const struct kernel_symbol *syms; 269 const struct kernel_symbol *syms;
@@ -319,6 +319,13 @@ struct module
319 319
320 unsigned int taints; /* same bits as kernel:tainted */ 320 unsigned int taints; /* same bits as kernel:tainted */
321 321
322#ifdef CONFIG_GENERIC_BUG
323 /* Support for BUG */
324 struct list_head bug_list;
325 struct bug_entry *bug_table;
326 unsigned num_bugs;
327#endif
328
322#ifdef CONFIG_MODULE_UNLOAD 329#ifdef CONFIG_MODULE_UNLOAD
323 /* Reference counts */ 330 /* Reference counts */
324 struct module_ref ref[NR_CPUS]; 331 struct module_ref ref[NR_CPUS];
@@ -410,17 +417,7 @@ static inline int try_module_get(struct module *module)
410 return ret; 417 return ret;
411} 418}
412 419
413static inline void module_put(struct module *module) 420extern void module_put(struct module *module);
414{
415 if (module) {
416 unsigned int cpu = get_cpu();
417 local_dec(&module->ref[cpu].count);
418 /* Maybe they're waiting for us to drop reference? */
419 if (unlikely(!module_is_live(module)))
420 wake_up_process(module->waiter);
421 put_cpu();
422 }
423}
424 421
425#else /*!CONFIG_MODULE_UNLOAD*/ 422#else /*!CONFIG_MODULE_UNLOAD*/
426static inline int try_module_get(struct module *module) 423static inline int try_module_get(struct module *module)