Skip to content

Commit

Permalink
NFC: Rename nfc_llcp_disconnect() to nfc_llcp_send_disconnect()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thierry Escande authored and Samuel Ortiz committed Jun 14, 2013
1 parent 86eca4e commit 58e3dd1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 24 deletions.
1 change: 0 additions & 1 deletion net/nfc/llcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
22 changes: 1 addition & 21 deletions net/nfc/llcp_commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
{
Expand Down
4 changes: 2 additions & 2 deletions net/nfc/llcp_sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down

0 comments on commit 58e3dd1

Please sign in to comment.