mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-30 07:34:12 +08:00
NFC: Rename nfc_llcp_disconnect() to nfc_llcp_send_disconnect()
nfc_llcp_send_disconnect() already exists but is not used. nfc_llcp_disconnect() naming is not consistent with other PDU sending functions. This patch removes nfc_llcp_send_disconnect() and renames nfc_llcp_disconnect() Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
parent
86eca4e71f
commit
58e3dd1558
@ -246,7 +246,6 @@ struct nfc_llcp_sdp_tlv *nfc_llcp_build_sdreq_tlv(u8 tid, char *uri,
|
||||
void nfc_llcp_free_sdp_tlv(struct nfc_llcp_sdp_tlv *sdp);
|
||||
void nfc_llcp_free_sdp_tlv_list(struct hlist_head *sdp_head);
|
||||
void nfc_llcp_recv(void *data, struct sk_buff *skb, int err);
|
||||
int nfc_llcp_disconnect(struct nfc_llcp_sock *sock);
|
||||
int nfc_llcp_send_symm(struct nfc_dev *dev);
|
||||
int nfc_llcp_send_connect(struct nfc_llcp_sock *sock);
|
||||
int nfc_llcp_send_cc(struct nfc_llcp_sock *sock);
|
||||
|
@ -339,7 +339,7 @@ static struct sk_buff *llcp_allocate_pdu(struct nfc_llcp_sock *sock,
|
||||
return skb;
|
||||
}
|
||||
|
||||
int nfc_llcp_disconnect(struct nfc_llcp_sock *sock)
|
||||
int nfc_llcp_send_disconnect(struct nfc_llcp_sock *sock)
|
||||
{
|
||||
struct sk_buff *skb;
|
||||
struct nfc_dev *dev;
|
||||
@ -630,26 +630,6 @@ int nfc_llcp_send_dm(struct nfc_llcp_local *local, u8 ssap, u8 dsap, u8 reason)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int nfc_llcp_send_disconnect(struct nfc_llcp_sock *sock)
|
||||
{
|
||||
struct sk_buff *skb;
|
||||
struct nfc_llcp_local *local;
|
||||
|
||||
pr_debug("Send DISC\n");
|
||||
|
||||
local = sock->local;
|
||||
if (local == NULL)
|
||||
return -ENODEV;
|
||||
|
||||
skb = llcp_allocate_pdu(sock, LLCP_PDU_DISC, 0);
|
||||
if (skb == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
skb_queue_head(&local->tx_queue, skb);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int nfc_llcp_send_i_frame(struct nfc_llcp_sock *sock,
|
||||
struct msghdr *msg, size_t len)
|
||||
{
|
||||
|
@ -603,7 +603,7 @@ static int llcp_sock_release(struct socket *sock)
|
||||
|
||||
/* Send a DISC */
|
||||
if (sk->sk_state == LLCP_CONNECTED)
|
||||
nfc_llcp_disconnect(llcp_sock);
|
||||
nfc_llcp_send_disconnect(llcp_sock);
|
||||
|
||||
if (sk->sk_state == LLCP_LISTEN) {
|
||||
struct nfc_llcp_sock *lsk, *n;
|
||||
@ -614,7 +614,7 @@ static int llcp_sock_release(struct socket *sock)
|
||||
accept_sk = &lsk->sk;
|
||||
lock_sock(accept_sk);
|
||||
|
||||
nfc_llcp_disconnect(lsk);
|
||||
nfc_llcp_send_disconnect(lsk);
|
||||
nfc_llcp_accept_unlink(accept_sk);
|
||||
|
||||
release_sock(accept_sk);
|
||||
|
Loading…
Reference in New Issue
Block a user