X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=net%2Fnetrom%2Fnr_timer.c;h=1cb98e88f5e1cef557699464d6d9519ac14c9a85;hb=01aab518b084a547940ed6ff334e9a7721c7dc71;hp=75b72d389ba95283b4c0f1e9adfc69eb8d3ed2a5;hpb=e3ee3b78f83688a0ae4315e8be71b2eac559904a;p=linux-2.6-omap-h63xx.git diff --git a/net/netrom/nr_timer.c b/net/netrom/nr_timer.c index 75b72d389ba..1cb98e88f5e 100644 --- a/net/netrom/nr_timer.c +++ b/net/netrom/nr_timer.c @@ -40,21 +40,10 @@ void nr_init_timers(struct sock *sk) { struct nr_sock *nr = nr_sk(sk); - init_timer(&nr->t1timer); - nr->t1timer.data = (unsigned long)sk; - nr->t1timer.function = &nr_t1timer_expiry; - - init_timer(&nr->t2timer); - nr->t2timer.data = (unsigned long)sk; - nr->t2timer.function = &nr_t2timer_expiry; - - init_timer(&nr->t4timer); - nr->t4timer.data = (unsigned long)sk; - nr->t4timer.function = &nr_t4timer_expiry; - - init_timer(&nr->idletimer); - nr->idletimer.data = (unsigned long)sk; - nr->idletimer.function = &nr_idletimer_expiry; + setup_timer(&nr->t1timer, nr_t1timer_expiry, (unsigned long)sk); + setup_timer(&nr->t2timer, nr_t2timer_expiry, (unsigned long)sk); + setup_timer(&nr->t4timer, nr_t4timer_expiry, (unsigned long)sk); + setup_timer(&nr->idletimer, nr_idletimer_expiry, (unsigned long)sk); /* initialized by sock_init_data */ sk->sk_timer.data = (unsigned long)sk; @@ -138,8 +127,8 @@ static void nr_heartbeat_expiry(unsigned long param) if (sock_flag(sk, SOCK_DESTROY) || (sk->sk_state == TCP_LISTEN && sock_flag(sk, SOCK_DEAD))) { sock_hold(sk); - nr_destroy_socket(sk); bh_unlock_sock(sk); + nr_destroy_socket(sk); sock_put(sk); return; }