]> Pileus Git - ~andy/linux/commitdiff
Bluetooth: debug: Print l2cap_chan refcount
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>
Wed, 11 Jul 2012 11:43:34 +0000 (14:43 +0300)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Wed, 11 Jul 2012 13:09:20 +0000 (10:09 -0300)
Improve debug output.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
include/net/bluetooth/l2cap.h

index d80e3f0691b4982c38043dfd84d345ba2121a8cb..e5164ff55f272462943b5cfe6a8edeb4e2333d82 100644 (file)
@@ -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);
 }