[PATCH 09/69] sysctl: remove .child from dev/cdrom/

Lucian Adrian Grijincu
2011-05-01T01:37:59Z

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