Bluetooth: Convert internal SCO spinlock into a mutex
Subsystems (2)
Marcel Holtmann
maintainerPATCH 1/1 Bluetooth: Convert internal SCO spinlock into a mutex
Since the HCI even processing is done in a workqueue, there is no need to use a spinlock inside the SCO support. Convert this into a mutex.
Signed-off-by Marcel Holtmann <[email protected]>
--- net/bluetooth/sco.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
net/bluetooth/sco.c +4 -4
@@ -44,14 +44,14 @@ static struct bt_sock_list sco_sk_list = {struct sco_conn {struct hci_conn *hcon; -spinlock_t lock; +struct mutex lock;struct sock *sk;unsigned int mtu; }; -#define sco_conn_lock (c) spin_lock(&c->lock); -#define sco_conn_unlock (c) spin_unlock(&c->lock); +#define sco_conn_lock (c) mutex_lock(&c->lock); +#define sco_conn_unlock (c) mutex_unlock(&c->lock);static void sco_sock_close (struct sock *sk);static void sco_sock_kill (struct sock *sk);
@@ -112,7 +112,7 @@ static struct sco_conn *sco_conn_add(struct hci_conn *hcon)if (!conn)return NULL ; -spin_lock_init (&conn->lock); +mutex_init (&conn->lock); hcon->sco_data = conn; conn->hcon = hcon;
Signature · 1 line
1.9.3