Skip to contentSkip to conversation

arm: simplify two-level sysctl registration for ctl_isa_vars

PATCH Superseded Luis Chamberlain 1 participant 1 message Mar 10, 2023

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---

For more details see the new docs being updated [0].

[0] https://lore.kernel.org/all/[email protected]/T/#u

 arch/arm/kernel/isa.c | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)
arch/arm/kernel/isa.c +1 -17
index d8a509c5d5bd..20218876bef2 100644
@@ -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);
 }
Signature · 1 line
2.39.1