diff options
author | Andrei Emeltchenko <andrei.emeltchenko@intel.com> | 2012-11-14 19:39:30 +0400 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2012-11-20 01:30:00 +0400 |
commit | a514b17fab51c1433db920d76cf8ddda959e5da0 (patch) | |
tree | aedaf1cdddec615c2938813b57c7e5fc18c9199a /net/bluetooth/l2cap_core.c | |
parent | 522db70286fcce420e5fc1be107912fbd3806323 (diff) | |
download | linux-a514b17fab51c1433db920d76cf8ddda959e5da0.tar.xz |
Bluetooth: Refactor locking in amp_physical_cfm
Remove locking from l2cap_physical_cfm and lock chan inside
amp_physical_cfm.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth/l2cap_core.c')
-rw-r--r-- | net/bluetooth/l2cap_core.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index e4f52a7f08c6..22c4ef926b0d 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@ -4611,7 +4611,8 @@ static void l2cap_do_move_cancel(struct l2cap_chan *chan, int result) l2cap_ertm_send(chan); } -void l2cap_physical_cfm(struct l2cap_chan *chan, int result) +/* Invoke with locked chan */ +void __l2cap_physical_cfm(struct l2cap_chan *chan, int result) { u8 local_amp_id = chan->local_amp_id; u8 remote_amp_id = chan->remote_amp_id; @@ -4619,8 +4620,6 @@ void l2cap_physical_cfm(struct l2cap_chan *chan, int result) BT_DBG("chan %p, result %d, local_amp_id %d, remote_amp_id %d", chan, result, local_amp_id, remote_amp_id); - l2cap_chan_lock(chan); - if (chan->state == BT_DISCONN || chan->state == BT_CLOSED) { l2cap_chan_unlock(chan); return; @@ -4644,8 +4643,6 @@ void l2cap_physical_cfm(struct l2cap_chan *chan, int result) break; } } - - l2cap_chan_unlock(chan); } static inline int l2cap_move_channel_req(struct l2cap_conn *conn, |