diff options
Diffstat (limited to 'net/dccp/sysctl.c')
-rw-r--r-- | net/dccp/sysctl.c | 36 |
1 files changed, 7 insertions, 29 deletions
diff --git a/net/dccp/sysctl.c b/net/dccp/sysctl.c index c62c05039f69..21295993fdb8 100644 --- a/net/dccp/sysctl.c +++ b/net/dccp/sysctl.c | |||
@@ -100,41 +100,19 @@ static struct ctl_table dccp_default_table[] = { | |||
100 | { .ctl_name = 0, } | 100 | { .ctl_name = 0, } |
101 | }; | 101 | }; |
102 | 102 | ||
103 | static struct ctl_table dccp_table[] = { | 103 | static struct ctl_path dccp_path[] = { |
104 | { | 104 | { .procname = "net", .ctl_name = CTL_NET, }, |
105 | .ctl_name = NET_DCCP_DEFAULT, | 105 | { .procname = "dccp", .ctl_name = NET_DCCP, }, |
106 | .procname = "default", | 106 | { .procname = "default", .ctl_name = NET_DCCP_DEFAULT, }, |
107 | .mode = 0555, | 107 | { } |
108 | .child = dccp_default_table, | ||
109 | }, | ||
110 | { .ctl_name = 0, }, | ||
111 | }; | ||
112 | |||
113 | static struct ctl_table dccp_dir_table[] = { | ||
114 | { | ||
115 | .ctl_name = NET_DCCP, | ||
116 | .procname = "dccp", | ||
117 | .mode = 0555, | ||
118 | .child = dccp_table, | ||
119 | }, | ||
120 | { .ctl_name = 0, }, | ||
121 | }; | ||
122 | |||
123 | static struct ctl_table dccp_root_table[] = { | ||
124 | { | ||
125 | .ctl_name = CTL_NET, | ||
126 | .procname = "net", | ||
127 | .mode = 0555, | ||
128 | .child = dccp_dir_table, | ||
129 | }, | ||
130 | { .ctl_name = 0, }, | ||
131 | }; | 108 | }; |
132 | 109 | ||
133 | static struct ctl_table_header *dccp_table_header; | 110 | static struct ctl_table_header *dccp_table_header; |
134 | 111 | ||
135 | int __init dccp_sysctl_init(void) | 112 | int __init dccp_sysctl_init(void) |
136 | { | 113 | { |
137 | dccp_table_header = register_sysctl_table(dccp_root_table); | 114 | dccp_table_header = register_sysctl_paths(dccp_path, |
115 | dccp_default_table); | ||
138 | 116 | ||
139 | return dccp_table_header != NULL ? 0 : -ENOMEM; | 117 | return dccp_table_header != NULL ? 0 : -ENOMEM; |
140 | } | 118 | } |