From: Luis Chamberlain Date: Fri, 10 Mar 2023 23:28:49 +0000 (-0800) Subject: powerpc: Simplify sysctl registration for powersave_nap_ctl_table X-Git-Tag: v6.6.7~2957^2~131 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bfedee5dc406ddcd70d667be1501659f1b232b7f;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: Michael Ellerman Link: https://msgid.link/20230310232850.3960676-2-mcgrof@kernel.org --- diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c index b9a725a..b1c0418 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; }