summaryrefslogtreecommitdiff
path: root/net/bluetooth/l2cap_sock.c
diff options
context:
space:
mode:
authorGustavo Padovan <gustavo@padovan.org>2012-03-25 13:59:16 -0300
committerGustavo Padovan <gustavo@padovan.org>2012-05-09 00:41:36 -0300
commiteef1d9b668c51dcae58d8bb41ce0c805f866dbbd (patch)
treeca3bdca54bbeeb59a15d8d4dafbda33dbb000101 /net/bluetooth/l2cap_sock.c
parent14a284918416e480bf49f8c05dfeefa02640d2d6 (diff)
Bluetooth: Remove sk parameter from l2cap_chan_create()
Following the separation if core and sock code this change avoid manipulation of sk inside l2cap_chan_create(). Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
Diffstat (limited to 'net/bluetooth/l2cap_sock.c')
-rw-r--r--net/bluetooth/l2cap_sock.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
index 29122ed28ea9..53e563f01723 100644
--- a/net/bluetooth/l2cap_sock.c
+++ b/net/bluetooth/l2cap_sock.c
@@ -1048,12 +1048,14 @@ static struct sock *l2cap_sock_alloc(struct net *net, struct socket *sock, int p
sk->sk_protocol = proto;
sk->sk_state = BT_OPEN;
- chan = l2cap_chan_create(sk);
+ chan = l2cap_chan_create();
if (!chan) {
l2cap_sock_kill(sk);
return NULL;
}
+ chan->sk = sk;
+
l2cap_pi(sk)->chan = chan;
return sk;