diff options
| author | Shyam Saini <shyamsaini@linux.microsoft.com> | 2025-02-27 10:49:29 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-05-09 09:44:07 +0200 |
| commit | ace531f2fea11dd56fdfa11eb948cbf689e6339e (patch) | |
| tree | d1697262fda5e1d9b772d4dce376532c59c123f2 /include | |
| parent | 0ecbb45e30abd0b1e59012fa3f3d5781140248b3 (diff) | |
kernel: globalize lookup_or_create_module_kobject()
[ Upstream commit 7c76c813cfc42a7376378a0c4b7250db2eebab81 ]
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>
Stable-dep-of: f95bbfe18512 ("drivers: base: handle module_kobject creation")
Signed-off-by: Sasha Levin <sashal@kernel.org>
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 a98e188cf37b..f2a8624eef1e 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) |
