Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 78717
b: refs/heads/master
c: c6995bd
h: refs/heads/master
i:
  78715: a3efa03
v: v3
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Jan 28, 2008
1 parent 6d1e2b4 commit 08e0deb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 23 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3151a9ab04714d0323efbe3c6c12bc5b2b1f058d
refs/heads/master: c6995bdff0fc9f97621922a7f857fa640537a7e2
27 changes: 5 additions & 22 deletions trunk/net/ax25/sysctl_net_ax25.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -243,17 +229,14 @@ 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)
{
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);
Expand Down

0 comments on commit 08e0deb

Please sign in to comment.