Commit 4b10b274 authored by Andrei Emeltchenko's avatar Andrei Emeltchenko Committed by Gustavo Padovan

Bluetooth: debug: Print l2cap_chan refcount

Improve debug output.
Signed-off-by: default avatarAndrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
parent 9f1db00c
...@@ -672,11 +672,15 @@ enum { ...@@ -672,11 +672,15 @@ enum {
static inline void l2cap_chan_hold(struct l2cap_chan *c) static inline void l2cap_chan_hold(struct l2cap_chan *c)
{ {
BT_DBG("chan %p orig refcnt %d", c, atomic_read(&c->refcnt));
atomic_inc(&c->refcnt); atomic_inc(&c->refcnt);
} }
static inline void l2cap_chan_put(struct l2cap_chan *c) static inline void l2cap_chan_put(struct l2cap_chan *c)
{ {
BT_DBG("chan %p orig refcnt %d", c, atomic_read(&c->refcnt));
if (atomic_dec_and_test(&c->refcnt)) if (atomic_dec_and_test(&c->refcnt))
kfree(c); kfree(c);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment