Skip to content

Commit

Permalink
Bluetooth: debug: Fix printing refcnt for hci_conn
Browse files Browse the repository at this point in the history
Use the same style for refcnt printing through all Bluetooth code
taking the reference the l2cap_chan refcnt printing.

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 Aug 6, 2012
1 parent 8e8c7e3 commit 71becf0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions include/net/bluetooth/hci_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -581,17 +581,15 @@ void hci_conn_put_device(struct hci_conn *conn);

static inline void hci_conn_hold(struct hci_conn *conn)
{
BT_DBG("hcon %p refcnt %d -> %d", conn, atomic_read(&conn->refcnt),
atomic_read(&conn->refcnt) + 1);
BT_DBG("hcon %p orig refcnt %d", conn, atomic_read(&conn->refcnt));

atomic_inc(&conn->refcnt);
cancel_delayed_work(&conn->disc_work);
}

static inline void hci_conn_put(struct hci_conn *conn)
{
BT_DBG("hcon %p refcnt %d -> %d", conn, atomic_read(&conn->refcnt),
atomic_read(&conn->refcnt) - 1);
BT_DBG("hcon %p orig refcnt %d", conn, atomic_read(&conn->refcnt));

if (atomic_dec_and_test(&conn->refcnt)) {
unsigned long timeo;
Expand Down

0 comments on commit 71becf0

Please sign in to comment.