Skip to content

Commit

Permalink
arm: simplify two-level sysctl registration for ctl_isa_vars
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Luis Chamberlain committed Mar 19, 2023
1 parent 36657db commit 0234a6f
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions arch/arm/kernel/isa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit 0234a6f

Please sign in to comment.