diff options
author | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-02-03 23:36:42 -0500 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-02-07 22:43:30 -0500 |
commit | 554f05bb8a0707dcc0ba4ea1dba1fb9970846ab5 (patch) | |
tree | a7aaed5d2bf68fdd5be3a1a8a36d3382e99d109d /net/bluetooth/l2cap_sock.c | |
parent | 65390587c7bcf8bb60b48387db766d8d7dfea982 (diff) |
Bluetooth: move l2cap_sock_release() to l2cap_sock.c
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth/l2cap_sock.c')
-rw-r--r-- | net/bluetooth/l2cap_sock.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c index c1455f72bf03..20efd240a786 100644 --- a/net/bluetooth/l2cap_sock.c +++ b/net/bluetooth/l2cap_sock.c | |||
@@ -62,6 +62,23 @@ static void l2cap_sock_timeout(unsigned long arg) | |||
62 | sock_put(sk); | 62 | sock_put(sk); |
63 | } | 63 | } |
64 | 64 | ||
65 | static int l2cap_sock_release(struct socket *sock) | ||
66 | { | ||
67 | struct sock *sk = sock->sk; | ||
68 | int err; | ||
69 | |||
70 | BT_DBG("sock %p, sk %p", sock, sk); | ||
71 | |||
72 | if (!sk) | ||
73 | return 0; | ||
74 | |||
75 | err = l2cap_sock_shutdown(sock, 2); | ||
76 | |||
77 | sock_orphan(sk); | ||
78 | l2cap_sock_kill(sk); | ||
79 | return err; | ||
80 | } | ||
81 | |||
65 | static void l2cap_sock_destruct(struct sock *sk) | 82 | static void l2cap_sock_destruct(struct sock *sk) |
66 | { | 83 | { |
67 | BT_DBG("sk %p", sk); | 84 | BT_DBG("sk %p", sk); |