mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-05 14:17:43 +00:00
Bluetooth: debug: Print l2cap_chan refcount
Improve debug output. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
This commit is contained in:
parent
9f1db00cdc
commit
4b10b274e2
1 changed files with 4 additions and 0 deletions
|
@ -672,11 +672,15 @@ enum {
|
|||
|
||||
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);
|
||||
}
|
||||
|
||||
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))
|
||||
kfree(c);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue