mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
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>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user