diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2012-04-19 13:34:18 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-20 21:22:28 -0400 |
commit | 0ca7a4c87d27dd2fde0783dec94a821d6d035696 (patch) | |
tree | 3f9d1cd9a8146ce751e43f8f103a255fc7ec199d /include/net/ax25.h | |
parent | 4e5ca78541c549ec8886ad2fc19306f35ee672e1 (diff) | |
download | linux-0ca7a4c87d27dd2fde0783dec94a821d6d035696.tar.bz2 |
net ax25: Simplify and cleanup the ax25 sysctl handling.
Don't register/unregister every ax25 table in a batch. Instead register
and unregister per device ax25 sysctls as ax25 devices come and go.
This moves ax25 to be a completely modern sysctl user. Registering the
sysctls in just the initial network namespace, removing the use of
.child entries that are no longer natively supported by the sysctl core
and taking advantage of the fact that there are no longer any ordering
constraints between registering and unregistering different sysctl
tables.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ax25.h')
-rw-r--r-- | include/net/ax25.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/net/ax25.h b/include/net/ax25.h index 94e09d361bb1..8a7a1220e678 100644 --- a/include/net/ax25.h +++ b/include/net/ax25.h @@ -215,7 +215,7 @@ typedef struct ax25_dev { struct ax25_dev *next; struct net_device *dev; struct net_device *forward; - struct ctl_table *systable; + struct ctl_table_header *sysheader; int values[AX25_MAX_VALUES]; #if defined(CONFIG_AX25_DAMA_SLAVE) || defined(CONFIG_AX25_DAMA_MASTER) ax25_dama_info dama; @@ -441,11 +441,11 @@ extern void ax25_uid_free(void); /* sysctl_net_ax25.c */ #ifdef CONFIG_SYSCTL -extern void ax25_register_sysctl(void); -extern void ax25_unregister_sysctl(void); +extern int ax25_register_dev_sysctl(ax25_dev *ax25_dev); +extern void ax25_unregister_dev_sysctl(ax25_dev *ax25_dev); #else -static inline void ax25_register_sysctl(void) {}; -static inline void ax25_unregister_sysctl(void) {}; +static inline int ax25_register_dev_sysctl(ax25_dev *ax25_dev) { return 0 }; +static inline void ax25_unregister_dev_sysctl(ax25_dev *ax25_dev) {}; #endif /* CONFIG_SYSCTL */ #endif |