arm: simplify two-level sysctl registration for ctl_isa_vars

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>
This commit is contained in:
Luis Chamberlain 2023-03-10 00:50:50 -08:00
Родитель 03860ef038
Коммит ca14ccf310
1 изменённых файлов: 1 добавлений и 17 удалений

Просмотреть файл

@ -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);
}