summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis Chamberlain <mcgrof@kernel.org>2023-03-11 02:28:49 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2023-03-16 07:18:12 +0300
commitbfedee5dc406ddcd70d667be1501659f1b232b7f (patch)
tree8c386ec93b22718ef8a0ece28e2fed34a7e4c047
parent0aafbdf35c75cbfec82636d01e6dc7950bc1507c (diff)
downloadlinux-bfedee5dc406ddcd70d667be1501659f1b232b7f.tar.xz
powerpc: Simplify sysctl registration for powersave_nap_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: Luis Chamberlain <mcgrof@kernel.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20230310232850.3960676-2-mcgrof@kernel.org
-rw-r--r--arch/powerpc/kernel/idle.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c
index b9a725abc596..b1c0418b25c8 100644
--- a/arch/powerpc/kernel/idle.c
+++ b/arch/powerpc/kernel/idle.c
@@ -107,19 +107,11 @@ static struct ctl_table powersave_nap_ctl_table[] = {
},
{}
};
-static struct ctl_table powersave_nap_sysctl_root[] = {
- {
- .procname = "kernel",
- .mode = 0555,
- .child = powersave_nap_ctl_table,
- },
- {}
-};
static int __init
register_powersave_nap_sysctl(void)
{
- register_sysctl_table(powersave_nap_sysctl_root);
+ register_sysctl("kernel", powersave_nap_ctl_table);
return 0;
}