Commit 554f05bb authored by Gustavo F. Padovan's avatar Gustavo F. Padovan

Bluetooth: move l2cap_sock_release() to l2cap_sock.c

Signed-off-by: default avatarGustavo F. Padovan <padovan@profusion.mobi>
parent 65390587
...@@ -438,7 +438,6 @@ void l2cap_sock_init(struct sock *sk, struct sock *parent); ...@@ -438,7 +438,6 @@ void l2cap_sock_init(struct sock *sk, struct sock *parent);
struct sock *l2cap_sock_alloc(struct net *net, struct socket *sock, struct sock *l2cap_sock_alloc(struct net *net, struct socket *sock,
int proto, gfp_t prio); int proto, gfp_t prio);
int l2cap_sock_release(struct socket *sock);
int l2cap_sock_bind(struct socket *sock, struct sockaddr *addr, int alen); int l2cap_sock_bind(struct socket *sock, struct sockaddr *addr, int alen);
int l2cap_sock_connect(struct socket *sock, struct sockaddr *addr, int alen, int flags); int l2cap_sock_connect(struct socket *sock, struct sockaddr *addr, int alen, int flags);
int l2cap_sock_listen(struct socket *sock, int backlog); int l2cap_sock_listen(struct socket *sock, int backlog);
......
...@@ -2159,23 +2159,6 @@ int l2cap_sock_shutdown(struct socket *sock, int how) ...@@ -2159,23 +2159,6 @@ int l2cap_sock_shutdown(struct socket *sock, int how)
return err; return err;
} }
int l2cap_sock_release(struct socket *sock)
{
struct sock *sk = sock->sk;
int err;
BT_DBG("sock %p, sk %p", sock, sk);
if (!sk)
return 0;
err = l2cap_sock_shutdown(sock, 2);
sock_orphan(sk);
l2cap_sock_kill(sk);
return err;
}
static void l2cap_chan_ready(struct sock *sk) static void l2cap_chan_ready(struct sock *sk)
{ {
struct sock *parent = bt_sk(sk)->parent; struct sock *parent = bt_sk(sk)->parent;
......
...@@ -62,6 +62,23 @@ static void l2cap_sock_timeout(unsigned long arg) ...@@ -62,6 +62,23 @@ static void l2cap_sock_timeout(unsigned long arg)
sock_put(sk); sock_put(sk);
} }
static int l2cap_sock_release(struct socket *sock)
{
struct sock *sk = sock->sk;
int err;
BT_DBG("sock %p, sk %p", sock, sk);
if (!sk)
return 0;
err = l2cap_sock_shutdown(sock, 2);
sock_orphan(sk);
l2cap_sock_kill(sk);
return err;
}
static void l2cap_sock_destruct(struct sock *sk) static void l2cap_sock_destruct(struct sock *sk)
{ {
BT_DBG("sk %p", sk); BT_DBG("sk %p", sk);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment