diff options
| author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-04-19 08:23:28 -0400 |
|---|---|---|
| committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-04-19 08:23:28 -0400 |
| commit | d5aeee8cb28317ef608ecac421abc4d986d585d2 (patch) | |
| tree | 70ec8ed8891f26e5c58152ffca9924ea1c58fe3a /include/linux/module.h | |
| parent | 32898a145404acbebe3256709e012c2830a2043b (diff) | |
| parent | e816b57a337ea3b755de72bec38c10c864f23015 (diff) | |
Merge tag 'v3.4-rc3' into staging/for_v3.5
* tag 'v3.4-rc3': (3755 commits)
Linux 3.4-rc3
x86-32: fix up strncpy_from_user() sign error
ARM: 7386/1: jump_label: fixup for rename to static_key
ARM: 7384/1: ThumbEE: Disable userspace TEEHBR access for !CONFIG_ARM_THUMBEE
ARM: 7382/1: mm: truncate memory banks to fit in 4GB space for classic MMU
ARM: 7359/2: smp_twd: Only wait for reprogramming on active cpus
PCI: Fix regression in pci_restore_state(), v3
SCSI: Fix error handling when no ULD is attached
ARM: OMAP: clock: cleanup CPUfreq leftovers, fix build errors
ARM: dts: remove blank interrupt-parent properties
ARM: EXYNOS: Fix Kconfig dependencies for device tree enabled machine files
do not export kernel's NULL #define to userspace
ARM: EXYNOS: Remove broken config values for touchscren for NURI board
ARM: EXYNOS: set fix xusbxti clock for NURI and Universal210 boards
ARM: EXYNOS: fix regulator name for NURI board
ARM: SAMSUNG: make SAMSUNG_PM_DEBUG select DEBUG_LL
cpufreq: OMAP: fix build errors: depends on ARCH_OMAP2PLUS
sparc64: Eliminate obsolete __handle_softirq() function
sparc64: Fix bootup crash on sun4v.
ARM: msm: Fix section mismatches in proc_comm.c
...
Diffstat (limited to 'include/linux/module.h')
| -rw-r--r-- | include/linux/module.h | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/include/linux/module.h b/include/linux/module.h index 4598bf03e98b..fbcafe2ee13e 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
| @@ -21,8 +21,6 @@ | |||
| 21 | #include <linux/percpu.h> | 21 | #include <linux/percpu.h> |
| 22 | #include <asm/module.h> | 22 | #include <asm/module.h> |
| 23 | 23 | ||
| 24 | #include <trace/events/module.h> | ||
| 25 | |||
| 26 | /* Not Yet Implemented */ | 24 | /* Not Yet Implemented */ |
| 27 | #define MODULE_SUPPORTED_DEVICE(name) | 25 | #define MODULE_SUPPORTED_DEVICE(name) |
| 28 | 26 | ||
| @@ -452,33 +450,11 @@ void symbol_put_addr(void *addr); | |||
| 452 | 450 | ||
| 453 | /* Sometimes we know we already have a refcount, and it's easier not | 451 | /* Sometimes we know we already have a refcount, and it's easier not |
| 454 | to handle the error case (which only happens with rmmod --wait). */ | 452 | to handle the error case (which only happens with rmmod --wait). */ |
| 455 | static inline void __module_get(struct module *module) | 453 | extern void __module_get(struct module *module); |
| 456 | { | ||
| 457 | if (module) { | ||
| 458 | preempt_disable(); | ||
| 459 | __this_cpu_inc(module->refptr->incs); | ||
| 460 | trace_module_get(module, _THIS_IP_); | ||
| 461 | preempt_enable(); | ||
| 462 | } | ||
| 463 | } | ||
| 464 | |||
| 465 | static inline int try_module_get(struct module *module) | ||
| 466 | { | ||
| 467 | int ret = 1; | ||
| 468 | |||
| 469 | if (module) { | ||
| 470 | preempt_disable(); | ||
| 471 | 454 | ||
| 472 | if (likely(module_is_live(module))) { | 455 | /* This is the Right Way to get a module: if it fails, it's being removed, |
| 473 | __this_cpu_inc(module->refptr->incs); | 456 | * so pretend it's not there. */ |
| 474 | trace_module_get(module, _THIS_IP_); | 457 | extern bool try_module_get(struct module *module); |
| 475 | } else | ||
| 476 | ret = 0; | ||
| 477 | |||
| 478 | preempt_enable(); | ||
| 479 | } | ||
| 480 | return ret; | ||
| 481 | } | ||
| 482 | 458 | ||
| 483 | extern void module_put(struct module *module); | 459 | extern void module_put(struct module *module); |
| 484 | 460 | ||
