diff options
| author | Linus Torvalds <torvalds@home.transmeta.com> | 2003-01-11 16:51:22 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2003-01-11 16:51:22 -0800 |
| commit | 29a928e0044549e82c6e576c57c182868e2ccd0a (patch) | |
| tree | f1e389ab5c3c903795e4ceec7d8688343a8176a3 /include/linux | |
| parent | 2bcdebe4e596eb1642e945ef8fbc705b919ad60c (diff) | |
Make MOD_[INC|DEC]_USE_COUNT a true no-op for built-in modules.
This also avoids the nasty warnings that nobody seems to bother
to fix.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/module.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/module.h b/include/linux/module.h index 8b0084419604..f38e535eacd9 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -61,6 +61,8 @@ extern const struct gtype##_id __mod_##gtype##_table \ __attribute__ ((unused, alias(__stringify(name)))) #define THIS_MODULE (&__this_module) +#define MOD_INC_USE_COUNT _MOD_INC_USE_COUNT(THIS_MODULE) +#define MOD_DEC_USE_COUNT __MOD_DEC_USE_COUNT(THIS_MODULE) /* * The following license idents are currently accepted as indicating free @@ -96,6 +98,8 @@ extern const struct gtype##_id __mod_##gtype##_table \ #define MODULE_GENERIC_TABLE(gtype,name) #define THIS_MODULE ((struct module *)0) +#define MOD_INC_USE_COUNT do { } while (0) +#define MOD_DEC_USE_COUNT do { } while (0) #define MODULE_LICENSE(license) #endif @@ -426,10 +430,6 @@ static inline void __deprecated _MOD_INC_USE_COUNT(struct module *module) try_module_get(module); #endif } -#define MOD_INC_USE_COUNT \ - _MOD_INC_USE_COUNT(THIS_MODULE) -#define MOD_DEC_USE_COUNT \ - __MOD_DEC_USE_COUNT(THIS_MODULE) #define EXPORT_NO_SYMBOLS extern int module_dummy_usage; #define GET_USE_COUNT(module) (module_dummy_usage) |
