mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
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
This commit is contained in:
committed by
Michael Ellerman
parent
0aafbdf35c
commit
bfedee5dc4
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user