From 3151a9ab04714d0323efbe3c6c12bc5b2b1f058d Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Wed, 9 Jan 2008 00:31:49 -0800 Subject: [DECNET]: Switch to using ctl_paths. The decnet includes two places to patch. The first one is the net/decnet table itself, and it is patched just like other subsystems in the first patch in this series. The second place is a bit more complex - it is the net/decnet/conf/xxx entries,. similar to those in ipv4/devinet.c and ipv6/addrconf.c. This code is made similar to those in ipv[46]. Signed-off-by: Pavel Emelyanov Signed-off-by: David S. Miller --- net/decnet/sysctl_net_decnet.c | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) (limited to 'net/decnet/sysctl_net_decnet.c') diff --git a/net/decnet/sysctl_net_decnet.c b/net/decnet/sysctl_net_decnet.c index ae354a43fb97..228067c571ba 100644 --- a/net/decnet/sysctl_net_decnet.c +++ b/net/decnet/sysctl_net_decnet.c @@ -470,28 +470,15 @@ static ctl_table dn_table[] = { {0} }; -static ctl_table dn_dir_table[] = { - { - .ctl_name = NET_DECNET, - .procname = "decnet", - .mode = 0555, - .child = dn_table}, - {0} -}; - -static ctl_table dn_root_table[] = { - { - .ctl_name = CTL_NET, - .procname = "net", - .mode = 0555, - .child = dn_dir_table - }, - {0} +static struct ctl_path dn_path[] = { + { .procname = "net", .ctl_name = CTL_NET, }, + { .procname = "decnet", .ctl_name = NET_DECNET, }, + { } }; void dn_register_sysctl(void) { - dn_table_header = register_sysctl_table(dn_root_table); + dn_table_header = register_sysctl_paths(dn_path, dn_table); } void dn_unregister_sysctl(void) -- cgit v1.2.2