X25: Move SYSCTL ifdefs into header
authorandrew hendry <andrew.hendry@gmail.com>
Tue, 24 Nov 2009 15:15:26 +0000 (15:15 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 29 Nov 2009 08:24:59 +0000 (00:24 -0800)
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>
include/net/x25.h
net/x25/af_x25.c

index 2cda0401156874213972853e7c2a1cbb19f00a06..9baa07dc7d17e31546407e91e2875a8960861cd8 100644 (file)
@@ -287,8 +287,14 @@ extern unsigned long x25_display_timer(struct sock *);
 extern void x25_check_rbuf(struct sock *);
 
 /* sysctl_net_x25.c */
+#ifdef CONFIG_SYSCTL
 extern void x25_register_sysctl(void);
 extern void x25_unregister_sysctl(void);
+#else
+static inline void x25_register_sysctl(void) {};
+static inline void x25_unregister_sysctl(void) {};
+#endif /* CONFIG_SYSCTL */
+
 struct x25_skb_cb {
        unsigned flags;
 };
index 2a3a513af3cb4aeffe82fc7a580693469d1e5238..f327ef5cb0e9f61b61bc5fbb9affa16b6e82663e 100644 (file)
@@ -1729,9 +1729,7 @@ static int __init x25_init(void)
 
        printk(KERN_INFO "X.25 for Linux Version 0.2\n");
 
-#ifdef CONFIG_SYSCTL
        x25_register_sysctl();
-#endif
        x25_proc_init();
 out:
        return rc;
@@ -1744,9 +1742,7 @@ static void __exit x25_exit(void)
        x25_link_free();
        x25_route_free();
 
-#ifdef CONFIG_SYSCTL
        x25_unregister_sysctl();
-#endif
 
        unregister_netdevice_notifier(&x25_dev_notifier);