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 /kernel | |
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 'kernel')
-rw-r--r-- | kernel/params.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/params.c b/kernel/params.c index 787662663e34..e668fc90b83e 100644 --- a/kernel/params.c +++ b/kernel/params.c @@ -760,7 +760,7 @@ void destroy_params(const struct kernel_param *params, unsigned num) params[i].ops->free(params[i].arg); } -static struct module_kobject * __init lookup_or_create_module_kobject(const char *name) +struct module_kobject __modinit * lookup_or_create_module_kobject(const char *name) { struct module_kobject *mk; struct kobject *kobj; |