Bluetooth: debug: Print amp_mgr refcnt
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>
Wed, 11 Jul 2012 11:43:35 +0000 (14:43 +0300)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Wed, 11 Jul 2012 13:09:37 +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>
net/bluetooth/a2mp.c

index fb93250b3938600e820eb8927049707532fc3871..4ff0bf3ba9a516bcb99e6a8165c38b81419a28c5 100644 (file)
@@ -501,7 +501,7 @@ static struct l2cap_chan *a2mp_chan_open(struct l2cap_conn *conn)
 /* AMP Manager functions */
 void amp_mgr_get(struct amp_mgr *mgr)
 {
-       BT_DBG("mgr %p", mgr);
+       BT_DBG("mgr %p orig refcnt %d", mgr, atomic_read(&mgr->kref.refcount));
 
        kref_get(&mgr->kref);
 }
@@ -517,7 +517,7 @@ static void amp_mgr_destroy(struct kref *kref)
 
 int amp_mgr_put(struct amp_mgr *mgr)
 {
-       BT_DBG("mgr %p", mgr);
+       BT_DBG("mgr %p orig refcnt %d", mgr, atomic_read(&mgr->kref.refcount));
 
        return kref_put(&mgr->kref, &amp_mgr_destroy);
 }