Commit 3a713753 authored by Luis Chamberlain's avatar Luis Chamberlain Committed by Michael Ellerman

powerpc: Simplify sysctl registration for nmi_wd_lpm_factor_ctl_table

There is no need to declare an extra tables to just create directory,
this can be easily be done with a prefix path with register_sysctl().

Simplify this registration.
Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230310232850.3960676-3-mcgrof@kernel.org
parent bfedee5d
...@@ -62,18 +62,10 @@ static struct ctl_table nmi_wd_lpm_factor_ctl_table[] = { ...@@ -62,18 +62,10 @@ static struct ctl_table nmi_wd_lpm_factor_ctl_table[] = {
}, },
{} {}
}; };
static struct ctl_table nmi_wd_lpm_factor_sysctl_root[] = {
{
.procname = "kernel",
.mode = 0555,
.child = nmi_wd_lpm_factor_ctl_table,
},
{}
};
static int __init register_nmi_wd_lpm_factor_sysctl(void) static int __init register_nmi_wd_lpm_factor_sysctl(void)
{ {
register_sysctl_table(nmi_wd_lpm_factor_sysctl_root); register_sysctl("kernel", nmi_wd_lpm_factor_ctl_table);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment