Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4b10b274 authored by Andrei Emeltchenko's avatar Andrei Emeltchenko Committed by Gustavo Padovan
Browse files

Bluetooth: debug: Print l2cap_chan refcount

parent 9f1db00c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -672,11 +672,15 @@ enum {

static inline void l2cap_chan_hold(struct l2cap_chan *c)
{
	BT_DBG("chan %p orig refcnt %d", c, atomic_read(&c->refcnt));

	atomic_inc(&c->refcnt);
}

static inline void l2cap_chan_put(struct l2cap_chan *c)
{
	BT_DBG("chan %p orig refcnt %d", c, atomic_read(&c->refcnt));

	if (atomic_dec_and_test(&c->refcnt))
		kfree(c);
}