diff options
Diffstat (limited to 'net/phonet/sysctl.c')
-rw-r--r-- | net/phonet/sysctl.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/net/phonet/sysctl.c b/net/phonet/sysctl.c index cea1c7dbdae2..696348fd31a1 100644 --- a/net/phonet/sysctl.c +++ b/net/phonet/sysctl.c | |||
@@ -27,6 +27,10 @@ | |||
27 | #include <linux/errno.h> | 27 | #include <linux/errno.h> |
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | 29 | ||
30 | #include <net/sock.h> | ||
31 | #include <linux/phonet.h> | ||
32 | #include <net/phonet/phonet.h> | ||
33 | |||
30 | #define DYNAMIC_PORT_MIN 0x40 | 34 | #define DYNAMIC_PORT_MIN 0x40 |
31 | #define DYNAMIC_PORT_MAX 0x7f | 35 | #define DYNAMIC_PORT_MAX 0x7f |
32 | 36 | ||
@@ -46,7 +50,8 @@ static void set_local_port_range(int range[2]) | |||
46 | 50 | ||
47 | void phonet_get_local_port_range(int *min, int *max) | 51 | void phonet_get_local_port_range(int *min, int *max) |
48 | { | 52 | { |
49 | unsigned seq; | 53 | unsigned int seq; |
54 | |||
50 | do { | 55 | do { |
51 | seq = read_seqbegin(&local_port_range_lock); | 56 | seq = read_seqbegin(&local_port_range_lock); |
52 | if (min) | 57 | if (min) |
@@ -93,19 +98,13 @@ static struct ctl_table phonet_table[] = { | |||
93 | { } | 98 | { } |
94 | }; | 99 | }; |
95 | 100 | ||
96 | static struct ctl_path phonet_ctl_path[] = { | ||
97 | { .procname = "net", }, | ||
98 | { .procname = "phonet", }, | ||
99 | { }, | ||
100 | }; | ||
101 | |||
102 | int __init phonet_sysctl_init(void) | 101 | int __init phonet_sysctl_init(void) |
103 | { | 102 | { |
104 | phonet_table_hrd = register_sysctl_paths(phonet_ctl_path, phonet_table); | 103 | phonet_table_hrd = register_net_sysctl(&init_net, "net/phonet", phonet_table); |
105 | return phonet_table_hrd == NULL ? -ENOMEM : 0; | 104 | return phonet_table_hrd == NULL ? -ENOMEM : 0; |
106 | } | 105 | } |
107 | 106 | ||
108 | void phonet_sysctl_exit(void) | 107 | void phonet_sysctl_exit(void) |
109 | { | 108 | { |
110 | unregister_sysctl_table(phonet_table_hrd); | 109 | unregister_net_sysctl_table(phonet_table_hrd); |
111 | } | 110 | } |