diff options
| author | Takashi Iwai <tiwai@suse.de> | 2012-04-07 12:28:00 +0200 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2012-04-07 12:28:00 +0200 |
| commit | c38f62b08d800104fa9b0e9d6e9141459986c06d (patch) | |
| tree | 1d04d768c8aa0c1a544d1f068317c7beb0101be2 /include/linux/module.h | |
| parent | 250f32747e62cb415b85083e247184188f24e566 (diff) | |
| parent | 8abe05c6eb358967f16bce8a02c88d57c82cfbd6 (diff) | |
Merge tag 'asoc-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: fixes for 3.4
A bunch of driver-specific fixes and one generic fix for the new support
for platform DAPM contexts - we were picking the wrong default for the
idle_bias_off setting which was meaning we weren't actually achieving
any useful runtime PM on platform devices.
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 @@ #include <linux/percpu.h> #include <asm/module.h> -#include <trace/events/module.h> - /* Not Yet Implemented */ #define MODULE_SUPPORTED_DEVICE(name) @@ -452,33 +450,11 @@ void symbol_put_addr(void *addr); /* Sometimes we know we already have a refcount, and it's easier not to handle the error case (which only happens with rmmod --wait). */ -static inline void __module_get(struct module *module) -{ - if (module) { - preempt_disable(); - __this_cpu_inc(module->refptr->incs); - trace_module_get(module, _THIS_IP_); - preempt_enable(); - } -} - -static inline int try_module_get(struct module *module) -{ - int ret = 1; - - if (module) { - preempt_disable(); +extern void __module_get(struct module *module); - if (likely(module_is_live(module))) { - __this_cpu_inc(module->refptr->incs); - trace_module_get(module, _THIS_IP_); - } else - ret = 0; - - preempt_enable(); - } - return ret; -} +/* This is the Right Way to get a module: if it fails, it's being removed, + * so pretend it's not there. */ +extern bool try_module_get(struct module *module); extern void module_put(struct module *module); |
