diff options
author | Andrei Emeltchenko <andrei.emeltchenko@intel.com> | 2012-07-11 11:43:34 (GMT) |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2012-07-11 13:09:20 (GMT) |
commit | 4b10b274e22ca6df1cda2fccf3870b8586feec15 (patch) | |
tree | 25e6cbd43d3803ac1f7a46fa52fef02a769eac96 /include/net/bluetooth/l2cap.h | |
parent | 9f1db00cdc9429593a887c20fb4372a6fb82a96c (diff) | |
download | linux-fsl-qoriq-4b10b274e22ca6df1cda2fccf3870b8586feec15.tar.xz |
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>
Diffstat (limited to 'include/net/bluetooth/l2cap.h')
-rw-r--r-- | include/net/bluetooth/l2cap.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h index d80e3f0..e5164ff 100644 --- a/include/net/bluetooth/l2cap.h +++ b/include/net/bluetooth/l2cap.h @@ -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); } |