Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Kernel v2.6.25-rc7 /net/ax25/sysctl_net_ax25.c

Filename:/net/ax25/sysctl_net_ax25.c
Lines Added:5
Lines Deleted:22
Also changed in: (Previous) 2.6.25-rc6  2.6.25-rc5  2.6.25-rc4  2.6.25-rc3  2.6.25-rc2  2.6.25-rc1 
(Following) 2.6.25-rc8  2.6.25-rc9  2.6.25  2.6.26.4-rc1  2.6.26.4  2.6.26.5 

Location
[  2.6.25-rc7
  [  net
    [  ax25
       o  sysctl_net_ax25.c

Patch

diff --git a/net/ax25/sysctl_net_ax25.c b/net/ax25/sysctl_net_ax25.c
index 443a836..f597987 100644
--- a/net/ax25/sysctl_net_ax25.c
+++ b/net/ax25/sysctl_net_ax25.c
@@ -31,25 +31,11 @@ static struct ctl_table_header *ax25_table_header;
 static ctl_table *ax25_table;
 static int ax25_table_size;
 
-static ctl_table ax25_dir_table[] = {
-   {
-      .ctl_name   = NET_AX25,
-      .procname   = "ax25",
-      .mode      = 0555,
-   },
-   { .ctl_name = 0 }
-};
-
-static ctl_table ax25_root_table[] = {
-   {
-      .ctl_name   = CTL_NET,
-      .procname   = "net",
-      .mode      = 0555,
-      .child      = ax25_dir_table
-   },
-   { .ctl_name = 0 }
+static struct ctl_path ax25_path[] = {
+   { .procname = "net", .ctl_name = CTL_NET, },
+   { .procname = "ax25", .ctl_name = NET_AX25, },
+   { }
 };
-
 static const ctl_table ax25_param_table[] = {
    {
       .ctl_name   = NET_AX25_IP_DEFAULT_MODE,
@@ -243,9 +229,7 @@ void ax25_register_sysctl(void)
    }
    spin_unlock_bh(&ax25_dev_lock);
 
-   ax25_dir_table[0].child = ax25_table;
-
-   ax25_table_header = register_sysctl_table(ax25_root_table);
+   ax25_table_header = register_sysctl_paths(ax25_path, ax25_table);
 }
 
 void ax25_unregister_sysctl(void)
@@ -253,7 +237,6 @@ void ax25_unregister_sysctl(void)
    ctl_table *p;
    unregister_sysctl_table(ax25_table_header);
 
-   ax25_dir_table[0].child = NULL;
    for (p = ax25_table; p->ctl_name; p++)
       kfree(p->child);
    kfree(ax25_table);


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.