diff options
author | Andrei Emeltchenko <andrei.emeltchenko@intel.com> | 2012-09-06 08:05:45 -0400 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2012-09-08 17:06:10 -0400 |
commit | 376261ae3627b03574994496f70f95d5538795d5 (patch) | |
tree | 3548e4938d2e72a166cd8c06d5d6a5d9f1694810 /include/net | |
parent | 93f71941c6d3ead73ca74d447b4007c6908f6eb5 (diff) |
Bluetooth: debug: Print refcnt for hci_dev
Add debug output for HCI kref.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/bluetooth/hci_core.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 4704ca4b8767..6a3337e9c42c 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) | |||
603 | /* ----- HCI Devices ----- */ | 603 | /* ----- HCI Devices ----- */ |
604 | static inline void hci_dev_put(struct hci_dev *d) | 604 | static inline void hci_dev_put(struct hci_dev *d) |
605 | { | 605 | { |
606 | BT_DBG("%s orig refcnt %d", d->name, | ||
607 | atomic_read(&d->dev.kobj.kref.refcount)); | ||
608 | |||
606 | put_device(&d->dev); | 609 | put_device(&d->dev); |
607 | } | 610 | } |
608 | 611 | ||
609 | static inline struct hci_dev *hci_dev_hold(struct hci_dev *d) | 612 | static inline struct hci_dev *hci_dev_hold(struct hci_dev *d) |
610 | { | 613 | { |
614 | BT_DBG("%s orig refcnt %d", d->name, | ||
615 | atomic_read(&d->dev.kobj.kref.refcount)); | ||
616 | |||
611 | get_device(&d->dev); | 617 | get_device(&d->dev); |
612 | return d; | 618 | return d; |
613 | } | 619 | } |