diff options
author | Shyam Saini <shyamsaini@linux.microsoft.com> | 2025-02-27 10:49:29 -0800 |
---|---|---|
committer | Petr Pavlu <petr.pavlu@suse.com> | 2025-04-16 14:54:53 +0200 |
commit | 7c76c813cfc42a7376378a0c4b7250db2eebab81 (patch) | |
tree | d6c48cf5d291e39da1323f9bada8aea2b454685c /include | |
parent | 1c7777feb0e2f5925908c489513656ebb443a699 (diff) |
kernel: globalize lookup_or_create_module_kobject()
lookup_or_create_module_kobject() is marked as static and __init,
to make it global drop static keyword.
Since this function can be called from non-init code, use __modinit
instead of __init, __modinit marker will make it __init if
CONFIG_MODULES is not defined.
Suggested-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Shyam Saini <shyamsaini@linux.microsoft.com>
Link: https://lore.kernel.org/r/20250227184930.34163-4-shyamsaini@linux.microsoft.com
Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/module.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/module.h b/include/linux/module.h index d94b196d5a34..b3329110d668 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -162,6 +162,8 @@ extern void cleanup_module(void); #define __INITRODATA_OR_MODULE __INITRODATA #endif /*CONFIG_MODULES*/ +struct module_kobject *lookup_or_create_module_kobject(const char *name); + /* Generic info of form tag = "info" */ #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info) |