arm: simplify two-level sysctl registration for ctl_isa_vars
authorLuis Chamberlain <mcgrof@kernel.org>
Fri, 10 Mar 2023 08:50:50 +0000 (00:50 -0800)
committerLuis Chamberlain <mcgrof@kernel.org>
Thu, 13 Apr 2023 18:49:35 +0000 (11:49 -0700)
There is no need to declare two tables to just create directories,
this can be easily be done with a prefix path with register_sysctl().

Simplify this registration.

Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
arch/arm/kernel/isa.c

index d8a509c5d5bd8619fac1d74d526971daa6af34a5..20218876bef290b74d932f31f70bf8bb1c97748f 100644 (file)
@@ -40,27 +40,11 @@ static struct ctl_table ctl_isa_vars[4] = {
 
 static struct ctl_table_header *isa_sysctl_header;
 
-static struct ctl_table ctl_isa[2] = {
-       {
-               .procname       = "isa",
-               .mode           = 0555,
-               .child          = ctl_isa_vars,
-       }, {}
-};
-
-static struct ctl_table ctl_bus[2] = {
-       {
-               .procname       = "bus",
-               .mode           = 0555,
-               .child          = ctl_isa,
-       }, {}
-};
-
 void __init
 register_isa_ports(unsigned int membase, unsigned int portbase, unsigned int portshift)
 {
        isa_membase = membase;
        isa_portbase = portbase;
        isa_portshift = portshift;
-       isa_sysctl_header = register_sysctl_table(ctl_bus);
+       isa_sysctl_header = register_sysctl("bus/isa", ctl_isa_vars);
 }