X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=net%2Fbluetooth%2Fsco.c;h=b0d487e2db206899576b26a62ed0f245673b339c;hb=ce1d5b23a8d1e19866ab82bdec0dc41fde5273d8;hp=93ad1aae3f38dece58f5820002216c18942b6b75;hpb=4fd3670eb1d3c33e8952cf1e79edbb2d517dcfb5;p=linux-2.6-omap-h63xx.git diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c index 93ad1aae3f3..b0d487e2db2 100644 --- a/net/bluetooth/sco.c +++ b/net/bluetooth/sco.c @@ -58,7 +58,7 @@ static const struct proto_ops sco_sock_ops; static struct bt_sock_list sco_sk_list = { - .lock = RW_LOCK_UNLOCKED + .lock = __RW_LOCK_UNLOCKED(sco_sk_list.lock) }; static void __sco_chan_add(struct sco_conn *conn, struct sock *sk, struct sock *parent); @@ -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) { @@ -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; @@ -810,7 +803,7 @@ static void sco_conn_ready(struct sco_conn *conn) bh_lock_sock(parent); - sk = sco_sock_alloc(parent->sk_net, NULL, BTPROTO_SCO, GFP_ATOMIC); + sk = sco_sock_alloc(sock_net(parent), NULL, BTPROTO_SCO, GFP_ATOMIC); if (!sk) { bh_unlock_sock(parent); goto done;