aboutsummaryrefslogtreecommitdiff
path: root/net/nfc/llcp/llcp.h
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2012-05-04 11:24:16 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2012-06-04 21:34:28 +0200
commitc7aa12252f5142b9eee2f6e34ca8870a8e7e048c (patch)
treee91c72609e7d13b3a185cf75acd74a8385c736c5 /net/nfc/llcp/llcp.h
parentf8f5701bdaf9134b1f90e5044a82c66324d2073f (diff)
NFC: Take a reference on the LLCP local pointer when creating a socket
LLCP sockets point to their local LLCP service, so they need to take a reference on it. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'net/nfc/llcp/llcp.h')
-rw-r--r--net/nfc/llcp/llcp.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/nfc/llcp/llcp.h b/net/nfc/llcp/llcp.h
index 50680ce5ae4..bc619553821 100644
--- a/net/nfc/llcp/llcp.h
+++ b/net/nfc/llcp/llcp.h
@@ -44,6 +44,8 @@ struct nfc_llcp_local {
struct list_head list;
struct nfc_dev *dev;
+ struct kref ref;
+
struct mutex sdp_lock;
struct mutex socket_lock;
@@ -165,6 +167,8 @@ struct nfc_llcp_sock {
struct nfc_llcp_local *nfc_llcp_find_local(struct nfc_dev *dev);
+struct nfc_llcp_local *nfc_llcp_local_get(struct nfc_llcp_local *local);
+int nfc_llcp_local_put(struct nfc_llcp_local *local);
u8 nfc_llcp_get_sdp_ssap(struct nfc_llcp_local *local,
struct nfc_llcp_sock *sock);
u8 nfc_llcp_get_local_ssap(struct nfc_llcp_local *local);