X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=net%2Fbluetooth%2Fsco.c;h=b91d3c81a73c58981ab105dd952bcafc65df35c6;hb=061964fb988ca51087948975da66ff523b3a5852;hp=82d0dfdfa7e268a3dc21d03fb6d3d822b6998c50;hpb=02bae2129710018883f9536969de7e6acf9304ca;p=linux-2.6 diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c index 82d0dfdfa7..b91d3c81a7 100644 --- a/net/bluetooth/sco.c +++ b/net/bluetooth/sco.c @@ -97,13 +97,6 @@ static void sco_sock_clear_timer(struct sock *sk) sk_stop_timer(sk, &sk->sk_timer); } -static void sco_sock_init_timer(struct sock *sk) -{ - init_timer(&sk->sk_timer); - sk->sk_timer.function = sco_sock_timeout; - sk->sk_timer.data = (unsigned long)sk; -} - /* ---- SCO connections ---- */ static struct sco_conn *sco_conn_add(struct hci_conn *hcon, __u8 status) { @@ -421,7 +414,7 @@ static struct sock *sco_sock_alloc(struct net *net, struct socket *sock, int pro { struct sock *sk; - sk = sk_alloc(net, PF_BLUETOOTH, prio, &sco_proto, 1); + sk = sk_alloc(net, PF_BLUETOOTH, prio, &sco_proto); if (!sk) return NULL; @@ -436,7 +429,7 @@ static struct sock *sco_sock_alloc(struct net *net, struct socket *sock, int pro sk->sk_protocol = proto; sk->sk_state = BT_OPEN; - sco_sock_init_timer(sk); + setup_timer(&sk->sk_timer, sco_sock_timeout, (unsigned long)sk); bt_sock_link(&sco_sk_list, sk); return sk;