aboutsummaryrefslogtreecommitdiffstats
path: root/net/irda
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2008-01-09 03:30:05 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:01:07 -0500
commitb5ccd792fa413f9336273cb8fa3b9dd3a7ec1735 (patch)
tree64b23972fdf667baa74a0895bf403b22eb7de86c /net/irda
parentcb7928a528264a69b29b6001b490b64607ed0557 (diff)
[NET]: Simple ctl_table to ctl_path conversions.
This patch includes many places, that only required replacing the ctl_table-s with appropriate ctl_paths and call register_sysctl_paths(). Nothing special was done with them. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/irda')
-rw-r--r--net/irda/irsysctl.c28
1 files changed, 5 insertions, 23 deletions
diff --git a/net/irda/irsysctl.c b/net/irda/irsysctl.c
index 565cbf0421cd..d8aba869ff11 100644
--- a/net/irda/irsysctl.c
+++ b/net/irda/irsysctl.c
@@ -234,28 +234,10 @@ static ctl_table irda_table[] = {
234 { .ctl_name = 0 } 234 { .ctl_name = 0 }
235}; 235};
236 236
237/* One directory */ 237static struct ctl_path irda_path[] = {
238static ctl_table irda_net_table[] = { 238 { .procname = "net", .ctl_name = CTL_NET, },
239 { 239 { .procname = "irda", .ctl_name = NET_IRDA, },
240 .ctl_name = NET_IRDA, 240 { }
241 .procname = "irda",
242 .maxlen = 0,
243 .mode = 0555,
244 .child = irda_table
245 },
246 { .ctl_name = 0 }
247};
248
249/* The parent directory */
250static ctl_table irda_root_table[] = {
251 {
252 .ctl_name = CTL_NET,
253 .procname = "net",
254 .maxlen = 0,
255 .mode = 0555,
256 .child = irda_net_table
257 },
258 { .ctl_name = 0 }
259}; 241};
260 242
261static struct ctl_table_header *irda_table_header; 243static struct ctl_table_header *irda_table_header;
@@ -268,7 +250,7 @@ static struct ctl_table_header *irda_table_header;
268 */ 250 */
269int __init irda_sysctl_register(void) 251int __init irda_sysctl_register(void)
270{ 252{
271 irda_table_header = register_sysctl_table(irda_root_table); 253 irda_table_header = register_sysctl_paths(irda_path, irda_table);
272 if (!irda_table_header) 254 if (!irda_table_header)
273 return -ENOMEM; 255 return -ENOMEM;
274 256