aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/l2cap.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/bluetooth/l2cap.c')
-rw-r--r--net/bluetooth/l2cap.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index 477e052b17b5..a8811c0a0cea 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -99,13 +99,6 @@ static void l2cap_sock_clear_timer(struct sock *sk)
99 sk_stop_timer(sk, &sk->sk_timer); 99 sk_stop_timer(sk, &sk->sk_timer);
100} 100}
101 101
102static void l2cap_sock_init_timer(struct sock *sk)
103{
104 init_timer(&sk->sk_timer);
105 sk->sk_timer.function = l2cap_sock_timeout;
106 sk->sk_timer.data = (unsigned long)sk;
107}
108
109/* ---- L2CAP channels ---- */ 102/* ---- L2CAP channels ---- */
110static struct sock *__l2cap_get_chan_by_dcid(struct l2cap_chan_list *l, u16 cid) 103static struct sock *__l2cap_get_chan_by_dcid(struct l2cap_chan_list *l, u16 cid)
111{ 104{
@@ -395,9 +388,7 @@ static struct l2cap_conn *l2cap_conn_add(struct hci_conn *hcon, u8 status)
395 388
396 conn->feat_mask = 0; 389 conn->feat_mask = 0;
397 390
398 init_timer(&conn->info_timer); 391 setup_timer(&conn->info_timer, l2cap_info_timeout, (unsigned long)conn);
399 conn->info_timer.function = l2cap_info_timeout;
400 conn->info_timer.data = (unsigned long) conn;
401 392
402 spin_lock_init(&conn->lock); 393 spin_lock_init(&conn->lock);
403 rwlock_init(&conn->chan_list.lock); 394 rwlock_init(&conn->chan_list.lock);
@@ -622,7 +613,7 @@ static struct sock *l2cap_sock_alloc(struct net *net, struct socket *sock, int p
622 sk->sk_protocol = proto; 613 sk->sk_protocol = proto;
623 sk->sk_state = BT_OPEN; 614 sk->sk_state = BT_OPEN;
624 615
625 l2cap_sock_init_timer(sk); 616 setup_timer(&sk->sk_timer, l2cap_sock_timeout, (unsigned long)sk);
626 617
627 bt_sock_link(&l2cap_sk_list, sk); 618 bt_sock_link(&l2cap_sk_list, sk);
628 return sk; 619 return sk;