From: Andrei Emeltchenko Date: Thu, 6 Sep 2012 12:05:45 +0000 (+0300) Subject: Bluetooth: debug: Print refcnt for hci_dev X-Git-Tag: v3.7-rc1~145^2~30^2~104^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=376261ae3627b03574994496f70f95d5538795d5;p=platform%2Fupstream%2Fkernel-adaptation-pc.git Bluetooth: debug: Print refcnt for hci_dev Add debug output for HCI kref. Signed-off-by: Andrei Emeltchenko Signed-off-by: Gustavo Padovan --- diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 4704ca4..6a3337e 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h @@ -603,11 +603,17 @@ static inline void hci_conn_put(struct hci_conn *conn) /* ----- HCI Devices ----- */ static inline void hci_dev_put(struct hci_dev *d) { + BT_DBG("%s orig refcnt %d", d->name, + atomic_read(&d->dev.kobj.kref.refcount)); + put_device(&d->dev); } static inline struct hci_dev *hci_dev_hold(struct hci_dev *d) { + BT_DBG("%s orig refcnt %d", d->name, + atomic_read(&d->dev.kobj.kref.refcount)); + get_device(&d->dev); return d; }