lkml.org 
[lkml]   [2011]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[v2 009/115] sysctl: remove .child from dev/cdrom/
Date
Signed-off-by: Lucian Adrian Grijincu <lucian.grijincu@gmail.com>
---
drivers/cdrom/cdrom.c | 22 ++++------------------
1 files changed, 4 insertions(+), 18 deletions(-)
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
index 514dd8e..9560789 100644
--- a/drivers/cdrom/cdrom.c
+++ b/drivers/cdrom/cdrom.c
@@ -3654,26 +3654,12 @@ static ctl_table cdrom_table[] = {
{ }
};

-static ctl_table cdrom_cdrom_table[] = {
- {
- .procname = "cdrom",
- .maxlen = 0,
- .mode = 0555,
- .child = cdrom_table,
- },
+static const struct ctl_path cdrom_root_path[] = {
+ { .procname = "dev" },
+ { .procname = "cdrom" },
{ }
};

-/* Make sure that /proc/sys/dev is there */
-static ctl_table cdrom_root_table[] = {
- {
- .procname = "dev",
- .maxlen = 0,
- .mode = 0555,
- .child = cdrom_cdrom_table,
- },
- { }
-};
static struct ctl_table_header *cdrom_sysctl_header;

static void cdrom_sysctl_register(void)
@@ -3683,7 +3669,7 @@ static void cdrom_sysctl_register(void)
if (initialized == 1)
return;

- cdrom_sysctl_header = register_sysctl_table(cdrom_root_table);
+ cdrom_sysctl_header = register_sysctl_paths(cdrom_root_path, cdrom_table);

/* set the defaults */
cdrom_sysctl_settings.autoclose = autoclose;
--
1.7.5.134.g1c08b


\
 
 \ /
  Last update: 2011-05-09 00:43    [from the cache]
©2003-2011 Jasper Spaans