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>
This commit is contained in:
Syam Sidhardhan
2012-07-27 23:51:21 +05:30
committed by Gustavo Padovan
parent ab19516a50
commit 144ad33020
2 changed files with 9 additions and 9 deletions

View File

@@ -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;