kernel: add __init for init funcs

This commit is contained in:
weishu
2023-01-19 16:38:45 +07:00
parent b328fd96bc
commit c252492a42
2 changed files with 2 additions and 2 deletions

View File

@@ -300,7 +300,7 @@ int ksu_handle_prctl(int option, unsigned long arg2, unsigned long arg3,
return 0;
}
int kernelsu_init(void)
int __init kernelsu_init(void)
{
#ifdef CONFIG_KSU_DEBUG
pr_alert("You are running DEBUG version of KernelSU");

View File

@@ -28,7 +28,7 @@ static struct security_hook_list ksu_hooks[] = {
LSM_HOOK_INIT(inode_rename, ksu_inode_rename),
};
void ksu_lsm_hook_init(void)
void __init ksu_lsm_hook_init(void)
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
security_add_hooks(ksu_hooks, ARRAY_SIZE(ksu_hooks), "ksu");