Thread (98 messages) flat view 98 messages, 2 authors, 2011-05-08

[v2 012/115] sysctl: remove .child from dev/rtc/

From: Lucian Adrian Grijincu <hidden>
Date: 2011-05-08 23:04:25
Also in: lkml
Subsystem: char and misc drivers, the rest · Maintainers: Arnd Bergmann, Greg Kroah-Hartman, Linus Torvalds

Signed-off-by: Lucian Adrian Grijincu <redacted>
---
 drivers/char/rtc.c |   24 ++++++------------------
 1 files changed, 6 insertions(+), 18 deletions(-)
diff --git a/drivers/char/rtc.c b/drivers/char/rtc.c
index dfa8b30..cc752f5 100644
--- a/drivers/char/rtc.c
+++ b/drivers/char/rtc.c
@@ -291,21 +291,9 @@ static ctl_table rtc_table[] = {
 	{ }
 };
 
-static ctl_table rtc_root[] = {
-	{
-		.procname	= "rtc",
-		.mode		= 0555,
-		.child		= rtc_table,
-	},
-	{ }
-};
-
-static ctl_table dev_root[] = {
-	{
-		.procname	= "dev",
-		.mode		= 0555,
-		.child		= rtc_root,
-	},
+static const __initdata struct ctl_path rtc_path[] = {
+	{ .procname = "dev" },
+	{ .procname = "rtc" },
 	{ }
 };
 
@@ -313,13 +301,13 @@ static struct ctl_table_header *sysctl_header;
 
 static int __init init_sysctl(void)
 {
-    sysctl_header = register_sysctl_table(dev_root);
-    return 0;
+	sysctl_header = register_sysctl_paths(rtc_path, rtc_table);
+	return 0;
 }
 
 static void __exit cleanup_sysctl(void)
 {
-    unregister_sysctl_table(sysctl_header);
+	unregister_sysctl_table(sysctl_header);
 }
 
 /*
-- 
1.7.5.134.g1c08b
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help