diff options
Diffstat (limited to 'include/linux/module.h')
-rw-r--r-- | include/linux/module.h | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/include/linux/module.h b/include/linux/module.h index d1d00ce8f4ed..d33df2408e05 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; |
@@ -410,17 +410,7 @@ static inline int try_module_get(struct module *module) | |||
410 | return ret; | 410 | return ret; |
411 | } | 411 | } |
412 | 412 | ||
413 | static inline void module_put(struct module *module) | 413 | extern 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 | 414 | ||
425 | #else /*!CONFIG_MODULE_UNLOAD*/ | 415 | #else /*!CONFIG_MODULE_UNLOAD*/ |
426 | static inline int try_module_get(struct module *module) | 416 | static inline int try_module_get(struct module *module) |