Skip to content

Commit

Permalink
ppc: simplify one-level sysctl registration for powersave_nap_ctl_table
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Luis Chamberlain committed Mar 19, 2023
1 parent 8d3f311 commit 77af581
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions arch/powerpc/kernel/idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 77af581

Please sign in to comment.