Skip to content

Commit 58e3dd1

Browse files
Thierry EscandeSamuel Ortiz
authored andcommitted
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 <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
1 parent 86eca4e commit 58e3dd1

File tree

3 files changed

+3
-24
lines changed

3 files changed

+3
-24
lines changed

net/nfc/llcp.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,6 @@ struct nfc_llcp_sdp_tlv *nfc_llcp_build_sdreq_tlv(u8 tid, char *uri,
246246
void nfc_llcp_free_sdp_tlv(struct nfc_llcp_sdp_tlv *sdp);
247247
void nfc_llcp_free_sdp_tlv_list(struct hlist_head *sdp_head);
248248
void nfc_llcp_recv(void *data, struct sk_buff *skb, int err);
249-
int nfc_llcp_disconnect(struct nfc_llcp_sock *sock);
250249
int nfc_llcp_send_symm(struct nfc_dev *dev);
251250
int nfc_llcp_send_connect(struct nfc_llcp_sock *sock);
252251
int nfc_llcp_send_cc(struct nfc_llcp_sock *sock);

net/nfc/llcp_commands.c

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ static struct sk_buff *llcp_allocate_pdu(struct nfc_llcp_sock *sock,
339339
return skb;
340340
}
341341

342-
int nfc_llcp_disconnect(struct nfc_llcp_sock *sock)
342+
int nfc_llcp_send_disconnect(struct nfc_llcp_sock *sock)
343343
{
344344
struct sk_buff *skb;
345345
struct nfc_dev *dev;
@@ -630,26 +630,6 @@ int nfc_llcp_send_dm(struct nfc_llcp_local *local, u8 ssap, u8 dsap, u8 reason)
630630
return 0;
631631
}
632632

633-
int nfc_llcp_send_disconnect(struct nfc_llcp_sock *sock)
634-
{
635-
struct sk_buff *skb;
636-
struct nfc_llcp_local *local;
637-
638-
pr_debug("Send DISC\n");
639-
640-
local = sock->local;
641-
if (local == NULL)
642-
return -ENODEV;
643-
644-
skb = llcp_allocate_pdu(sock, LLCP_PDU_DISC, 0);
645-
if (skb == NULL)
646-
return -ENOMEM;
647-
648-
skb_queue_head(&local->tx_queue, skb);
649-
650-
return 0;
651-
}
652-
653633
int nfc_llcp_send_i_frame(struct nfc_llcp_sock *sock,
654634
struct msghdr *msg, size_t len)
655635
{

net/nfc/llcp_sock.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ static int llcp_sock_release(struct socket *sock)
603603

604604
/* Send a DISC */
605605
if (sk->sk_state == LLCP_CONNECTED)
606-
nfc_llcp_disconnect(llcp_sock);
606+
nfc_llcp_send_disconnect(llcp_sock);
607607

608608
if (sk->sk_state == LLCP_LISTEN) {
609609
struct nfc_llcp_sock *lsk, *n;
@@ -614,7 +614,7 @@ static int llcp_sock_release(struct socket *sock)
614614
accept_sk = &lsk->sk;
615615
lock_sock(accept_sk);
616616

617-
nfc_llcp_disconnect(lsk);
617+
nfc_llcp_send_disconnect(lsk);
618618
nfc_llcp_accept_unlink(accept_sk);
619619

620620
release_sock(accept_sk);

0 commit comments

Comments
 (0)