diff options
author | andrew hendry <andrew.hendry@gmail.com> | 2009-11-24 10:15:26 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-29 03:24:59 -0500 |
commit | 2f5517aefcfbdd7fdf0f03b13d292a10d445887f (patch) | |
tree | dfceca6e5ce5a6de91f33f1d0f20e50fd55361ed | |
parent | 9f950f72e57fe4bf9b16ace67e4cc5ffcee79d00 (diff) |
X25: Move SYSCTL ifdefs into header
Moves the CONFIG_SYSCTL ifdefs in x25_init into header.
Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/net/x25.h | 6 | ||||
-rw-r--r-- | net/x25/af_x25.c | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/include/net/x25.h b/include/net/x25.h index 2cda04011568..9baa07dc7d17 100644 --- a/include/net/x25.h +++ b/include/net/x25.h | |||
@@ -287,8 +287,14 @@ extern unsigned long x25_display_timer(struct sock *); | |||
287 | extern void x25_check_rbuf(struct sock *); | 287 | extern void x25_check_rbuf(struct sock *); |
288 | 288 | ||
289 | /* sysctl_net_x25.c */ | 289 | /* sysctl_net_x25.c */ |
290 | #ifdef CONFIG_SYSCTL | ||
290 | extern void x25_register_sysctl(void); | 291 | extern void x25_register_sysctl(void); |
291 | extern void x25_unregister_sysctl(void); | 292 | extern void x25_unregister_sysctl(void); |
293 | #else | ||
294 | static inline void x25_register_sysctl(void) {}; | ||
295 | static inline void x25_unregister_sysctl(void) {}; | ||
296 | #endif /* CONFIG_SYSCTL */ | ||
297 | |||
292 | struct x25_skb_cb { | 298 | struct x25_skb_cb { |
293 | unsigned flags; | 299 | unsigned flags; |
294 | }; | 300 | }; |
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index 2a3a513af3cb..f327ef5cb0e9 100644 --- a/net/x25/af_x25.c +++ b/net/x25/af_x25.c | |||
@@ -1729,9 +1729,7 @@ static int __init x25_init(void) | |||
1729 | 1729 | ||
1730 | printk(KERN_INFO "X.25 for Linux Version 0.2\n"); | 1730 | printk(KERN_INFO "X.25 for Linux Version 0.2\n"); |
1731 | 1731 | ||
1732 | #ifdef CONFIG_SYSCTL | ||
1733 | x25_register_sysctl(); | 1732 | x25_register_sysctl(); |
1734 | #endif | ||
1735 | x25_proc_init(); | 1733 | x25_proc_init(); |
1736 | out: | 1734 | out: |
1737 | return rc; | 1735 | return rc; |
@@ -1744,9 +1742,7 @@ static void __exit x25_exit(void) | |||
1744 | x25_link_free(); | 1742 | x25_link_free(); |
1745 | x25_route_free(); | 1743 | x25_route_free(); |
1746 | 1744 | ||
1747 | #ifdef CONFIG_SYSCTL | ||
1748 | x25_unregister_sysctl(); | 1745 | x25_unregister_sysctl(); |
1749 | #endif | ||
1750 | 1746 | ||
1751 | unregister_netdevice_notifier(&x25_dev_notifier); | 1747 | unregister_netdevice_notifier(&x25_dev_notifier); |
1752 | 1748 | ||