diff options
Diffstat (limited to 'net/appletalk')
-rw-r--r-- | net/appletalk/aarp.c | 6 | ||||
-rw-r--r-- | net/appletalk/atalk_proc.c | 6 | ||||
-rw-r--r-- | net/appletalk/ddp.c | 5 | ||||
-rw-r--r-- | net/appletalk/sysctl_net_atalk.c | 24 |
4 files changed, 16 insertions, 25 deletions
diff --git a/net/appletalk/aarp.c b/net/appletalk/aarp.c index 6c5c6dc098e..18058bbc796 100644 --- a/net/appletalk/aarp.c +++ b/net/appletalk/aarp.c @@ -874,9 +874,7 @@ void __init aarp_proto_init(void) aarp_dl = register_snap_client(aarp_snap_id, aarp_rcv); if (!aarp_dl) printk(KERN_CRIT "Unable to register AARP with SNAP.\n"); - init_timer(&aarp_timer); - aarp_timer.function = aarp_expire_timeout; - aarp_timer.data = 0; + setup_timer(&aarp_timer, aarp_expire_timeout, 0); aarp_timer.expires = jiffies + sysctl_aarp_expiry_time; add_timer(&aarp_timer); register_netdevice_notifier(&aarp_notifier); @@ -943,6 +941,7 @@ static struct aarp_entry *iter_next(struct aarp_iter_state *iter, loff_t *pos) } static void *aarp_seq_start(struct seq_file *seq, loff_t *pos) + __acquires(aarp_lock) { struct aarp_iter_state *iter = seq->private; @@ -977,6 +976,7 @@ static void *aarp_seq_next(struct seq_file *seq, void *v, loff_t *pos) } static void aarp_seq_stop(struct seq_file *seq, void *v) + __releases(aarp_lock) { read_unlock_bh(&aarp_lock); } diff --git a/net/appletalk/atalk_proc.c b/net/appletalk/atalk_proc.c index 05d9652afcb..8e8dcfd532d 100644 --- a/net/appletalk/atalk_proc.c +++ b/net/appletalk/atalk_proc.c @@ -27,6 +27,7 @@ static __inline__ struct atalk_iface *atalk_get_interface_idx(loff_t pos) } static void *atalk_seq_interface_start(struct seq_file *seq, loff_t *pos) + __acquires(atalk_interfaces_lock) { loff_t l = *pos; @@ -52,6 +53,7 @@ out: } static void atalk_seq_interface_stop(struct seq_file *seq, void *v) + __releases(atalk_interfaces_lock) { read_unlock_bh(&atalk_interfaces_lock); } @@ -86,6 +88,7 @@ static __inline__ struct atalk_route *atalk_get_route_idx(loff_t pos) } static void *atalk_seq_route_start(struct seq_file *seq, loff_t *pos) + __acquires(atalk_routes_lock) { loff_t l = *pos; @@ -111,6 +114,7 @@ out: } static void atalk_seq_route_stop(struct seq_file *seq, void *v) + __releases(atalk_routes_lock) { read_unlock_bh(&atalk_routes_lock); } @@ -154,6 +158,7 @@ found: } static void *atalk_seq_socket_start(struct seq_file *seq, loff_t *pos) + __acquires(atalk_sockets_lock) { loff_t l = *pos; @@ -176,6 +181,7 @@ out: } static void atalk_seq_socket_stop(struct seq_file *seq, void *v) + __releases(atalk_sockets_lock) { read_unlock_bh(&atalk_sockets_lock); } diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c index e0d37d6dc1f..3be55c8ca4e 100644 --- a/net/appletalk/ddp.c +++ b/net/appletalk/ddp.c @@ -177,10 +177,9 @@ static inline void atalk_destroy_socket(struct sock *sk) if (atomic_read(&sk->sk_wmem_alloc) || atomic_read(&sk->sk_rmem_alloc)) { - init_timer(&sk->sk_timer); + setup_timer(&sk->sk_timer, atalk_destroy_timer, + (unsigned long)sk); sk->sk_timer.expires = jiffies + SOCK_DESTROY_TIME; - sk->sk_timer.function = atalk_destroy_timer; - sk->sk_timer.data = (unsigned long)sk; add_timer(&sk->sk_timer); } else sock_put(sk); diff --git a/net/appletalk/sysctl_net_atalk.c b/net/appletalk/sysctl_net_atalk.c index 7df1778e221..621805dfa2f 100644 --- a/net/appletalk/sysctl_net_atalk.c +++ b/net/appletalk/sysctl_net_atalk.c @@ -49,31 +49,17 @@ static struct ctl_table atalk_table[] = { { 0 }, }; -static struct ctl_table atalk_dir_table[] = { - { - .ctl_name = NET_ATALK, - .procname = "appletalk", - .mode = 0555, - .child = atalk_table, - }, - { 0 }, -}; - -static struct ctl_table atalk_root_table[] = { - { - .ctl_name = CTL_NET, - .procname = "net", - .mode = 0555, - .child = atalk_dir_table, - }, - { 0 }, +static struct ctl_path atalk_path[] = { + { .procname = "net", .ctl_name = CTL_NET, }, + { .procname = "appletalk", .ctl_name = NET_ATALK, }, + { } }; static struct ctl_table_header *atalk_table_header; void atalk_register_sysctl(void) { - atalk_table_header = register_sysctl_table(atalk_root_table); + atalk_table_header = register_sysctl_paths(atalk_path, atalk_table); } void atalk_unregister_sysctl(void) |