aboutsummaryrefslogtreecommitdiff
path: root/include/net/bluetooth
diff options
context:
space:
mode:
authorSyam Sidhardhan <s.syam@samsung.com>2012-07-27 23:51:21 +0530
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>2012-08-21 14:54:41 -0300
commit144ad33020a0af66fbb188ef3f13ca91c5326a69 (patch)
tree531a6c241a8e7dd5b5238fadef30e6f01c681006 /include/net/bluetooth
parentab19516a50b375c11b9fa442954a43454a730950 (diff)
Bluetooth: Use kref for l2cap channel reference counting
This patch changes the struct l2cap_chan and associated code to use kref api for object refcounting and freeing. Suggested-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by: Jaganath Kanakkassery <jaganath.k@samsung.com> Signed-off-by: Syam Sidhardhan <s.syam@samsung.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'include/net/bluetooth')
-rw-r--r--include/net/bluetooth/l2cap.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index d206296137e..7ed8e356425 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -433,11 +433,10 @@ struct l2cap_chan {
struct sock *sk;
struct l2cap_conn *conn;
+ struct kref kref;
__u8 state;
- atomic_t refcnt;
-
__le16 psm;
__u16 dcid;
__u16 scid;