diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2014-11-12 02:17:08 -0500 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-11-12 04:05:25 -0500 |
commit | a930430b047a0cc118bfc47ca54fcdfbadf091d2 (patch) | |
tree | f34b024966a7c54c7b9f9f49c86b0d2ba6c9d9f0 /net/bluetooth | |
parent | f03567040cbf874834c9e3e52b72fdcb672b9bbb (diff) |
Bluetooth: Remove unnecessary hci_dev_lock/unlock in smp.c
The mgmt_user_passkey_request and related functions do not do anything
else except read access to hdev->id. This member never changes after the
hdev creation so there is no need to acquire a lock to read it.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/smp.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c index 3ebf65b50881..3d38553eb526 100644 --- a/net/bluetooth/smp.c +++ b/net/bluetooth/smp.c | |||
@@ -514,8 +514,6 @@ static int tk_request(struct l2cap_conn *conn, u8 remote_oob, u8 auth, | |||
514 | set_bit(SMP_FLAG_TK_VALID, &smp->flags); | 514 | set_bit(SMP_FLAG_TK_VALID, &smp->flags); |
515 | } | 515 | } |
516 | 516 | ||
517 | hci_dev_lock(hcon->hdev); | ||
518 | |||
519 | if (method == REQ_PASSKEY) | 517 | if (method == REQ_PASSKEY) |
520 | ret = mgmt_user_passkey_request(hcon->hdev, &hcon->dst, | 518 | ret = mgmt_user_passkey_request(hcon->hdev, &hcon->dst, |
521 | hcon->type, hcon->dst_type); | 519 | hcon->type, hcon->dst_type); |
@@ -528,8 +526,6 @@ static int tk_request(struct l2cap_conn *conn, u8 remote_oob, u8 auth, | |||
528 | hcon->type, hcon->dst_type, | 526 | hcon->type, hcon->dst_type, |
529 | passkey, 0); | 527 | passkey, 0); |
530 | 528 | ||
531 | hci_dev_unlock(hcon->hdev); | ||
532 | |||
533 | return ret; | 529 | return ret; |
534 | } | 530 | } |
535 | 531 | ||