diff options
Diffstat (limited to 'include/net/bluetooth/l2cap.h')
-rw-r--r-- | include/net/bluetooth/l2cap.h | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h index a7679f8913d2..a1eb6786ce54 100644 --- a/include/net/bluetooth/l2cap.h +++ b/include/net/bluetooth/l2cap.h | |||
@@ -671,20 +671,8 @@ enum { | |||
671 | L2CAP_EV_RECV_FRAME, | 671 | L2CAP_EV_RECV_FRAME, |
672 | }; | 672 | }; |
673 | 673 | ||
674 | static inline void l2cap_chan_hold(struct l2cap_chan *c) | 674 | void l2cap_chan_hold(struct l2cap_chan *c); |
675 | { | 675 | void l2cap_chan_put(struct l2cap_chan *c); |
676 | BT_DBG("chan %p orig refcnt %d", c, atomic_read(&c->refcnt)); | ||
677 | |||
678 | atomic_inc(&c->refcnt); | ||
679 | } | ||
680 | |||
681 | static inline void l2cap_chan_put(struct l2cap_chan *c) | ||
682 | { | ||
683 | BT_DBG("chan %p orig refcnt %d", c, atomic_read(&c->refcnt)); | ||
684 | |||
685 | if (atomic_dec_and_test(&c->refcnt)) | ||
686 | kfree(c); | ||
687 | } | ||
688 | 676 | ||
689 | static inline void l2cap_chan_lock(struct l2cap_chan *chan) | 677 | static inline void l2cap_chan_lock(struct l2cap_chan *chan) |
690 | { | 678 | { |