Skip to content

Commit

Permalink
Bluetooth: debug: Print refcnt for hci_dev
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrei Emeltchenko authored and Gustavo Padovan committed Sep 8, 2012
1 parent 93f7194 commit 376261a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/net/bluetooth/hci_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 376261a

Please sign in to comment.