summaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorSyam Sidhardhan <s.syam@samsung.com>2012-07-27 20:21:21 +0200
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>2012-08-21 19:54:41 +0200
commit144ad33020a0af66fbb188ef3f13ca91c5326a69 (patch)
tree531a6c241a8e7dd5b5238fadef30e6f01c681006 /include/net
parentBluetooth: debug: Correct the PSM printing (diff)
downloadlinux-144ad33020a0af66fbb188ef3f13ca91c5326a69.tar.xz
linux-144ad33020a0af66fbb188ef3f13ca91c5326a69.zip
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')
-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 d206296137e2..7ed8e356425a 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;