Skip to content

Commit

Permalink
X25: Move SYSCTL ifdefs into header
Browse files Browse the repository at this point in the history
Moves the CONFIG_SYSCTL ifdefs in x25_init into header.

Signed-off-by: Andrew Hendry <[email protected]>
Acked-by: "Eric W. Biederman" <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
AndrewHendry authored and davem330 committed Nov 29, 2009
1 parent 9f950f7 commit 2f5517a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 6 additions & 0 deletions include/net/x25.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down
4 changes: 0 additions & 4 deletions net/x25/af_x25.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);

Expand Down

0 comments on commit 2f5517a

Please sign in to comment.