aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/l2cap_sock.c
diff options
context:
space:
mode:
authorGustavo Padovan <gustavo.padovan@collabora.co.uk>2012-05-27 21:27:51 -0400
committerJohan Hedberg <johan.hedberg@intel.com>2012-06-04 23:34:10 -0400
commit80b980279508edd1a92d8d77ec99b0ddad00c5fe (patch)
tree28ef9be0b618f37c3fc2b08c1114748517c3fe4a /net/bluetooth/l2cap_sock.c
parent3df92b31b2b593c5a067634ef2c30e76b2b2548d (diff)
Bluetooth: Use chan as parameters for l2cap chan ops
Use chan instead of void * makes more sense here. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/l2cap_sock.c')
-rw-r--r--net/bluetooth/l2cap_sock.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
index d244361a455c..db787f67c52a 100644
--- a/net/bluetooth/l2cap_sock.c
+++ b/net/bluetooth/l2cap_sock.c
@@ -872,9 +872,9 @@ static int l2cap_sock_release(struct socket *sock)
872 return err; 872 return err;
873} 873}
874 874
875static struct l2cap_chan *l2cap_sock_new_connection_cb(void *data) 875static struct l2cap_chan *l2cap_sock_new_connection_cb(struct l2cap_chan *chan)
876{ 876{
877 struct sock *sk, *parent = data; 877 struct sock *sk, *parent = chan->data;
878 878
879 sk = l2cap_sock_alloc(sock_net(parent), NULL, BTPROTO_L2CAP, 879 sk = l2cap_sock_alloc(sock_net(parent), NULL, BTPROTO_L2CAP,
880 GFP_ATOMIC); 880 GFP_ATOMIC);
@@ -888,10 +888,10 @@ static struct l2cap_chan *l2cap_sock_new_connection_cb(void *data)
888 return l2cap_pi(sk)->chan; 888 return l2cap_pi(sk)->chan;
889} 889}
890 890
891static int l2cap_sock_recv_cb(void *data, struct sk_buff *skb) 891static int l2cap_sock_recv_cb(struct l2cap_chan *chan, struct sk_buff *skb)
892{ 892{
893 int err; 893 int err;
894 struct sock *sk = data; 894 struct sock *sk = chan->data;
895 struct l2cap_pinfo *pi = l2cap_pi(sk); 895 struct l2cap_pinfo *pi = l2cap_pi(sk);
896 896
897 lock_sock(sk); 897 lock_sock(sk);
@@ -924,16 +924,16 @@ done:
924 return err; 924 return err;
925} 925}
926 926
927static void l2cap_sock_close_cb(void *data) 927static void l2cap_sock_close_cb(struct l2cap_chan *chan)
928{ 928{
929 struct sock *sk = data; 929 struct sock *sk = chan->data;
930 930
931 l2cap_sock_kill(sk); 931 l2cap_sock_kill(sk);
932} 932}
933 933
934static void l2cap_sock_state_change_cb(void *data, int state) 934static void l2cap_sock_state_change_cb(struct l2cap_chan *chan, int state)
935{ 935{
936 struct sock *sk = data; 936 struct sock *sk = chan->data;
937 937
938 sk->sk_state = state; 938 sk->sk_state = state;
939} 939}