diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2015-04-21 23:28:46 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2015-04-23 02:18:07 -0400 |
commit | 59afdc7b32143528524455039e7557a46b60e4c8 (patch) | |
tree | f188388b37d0d6d58191e177a16bb99990ede6f8 /include/linux/module.h | |
parent | 43a9607d86e8fb110b596d300dbaae895c198fed (diff) |
crypto: api - Move module sig ifdef into accessor function
Currently we're hiding mod->sig_ok under an ifdef in open code.
This patch adds a module_sig_ok accessor function and removes that
ifdef.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'include/linux/module.h')
-rw-r--r-- | include/linux/module.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/module.h b/include/linux/module.h index c883b86ea964..1e5436042eb0 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -655,4 +655,16 @@ static inline void module_bug_finalize(const Elf_Ehdr *hdr, | |||
655 | static inline void module_bug_cleanup(struct module *mod) {} | 655 | static inline void module_bug_cleanup(struct module *mod) {} |
656 | #endif /* CONFIG_GENERIC_BUG */ | 656 | #endif /* CONFIG_GENERIC_BUG */ |
657 | 657 | ||
658 | #ifdef CONFIG_MODULE_SIG | ||
659 | static inline bool module_sig_ok(struct module *module) | ||
660 | { | ||
661 | return module->sig_ok; | ||
662 | } | ||
663 | #else /* !CONFIG_MODULE_SIG */ | ||
664 | static inline bool module_sig_ok(struct module *module) | ||
665 | { | ||
666 | return true; | ||
667 | } | ||
668 | #endif /* CONFIG_MODULE_SIG */ | ||
669 | |||
658 | #endif /* _LINUX_MODULE_H */ | 670 | #endif /* _LINUX_MODULE_H */ |