linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: Remove locking in hci_user_passkey_request_evt
@ 2012-07-23 21:19 Andre Guedes
  2012-07-24 23:42 ` Gustavo Padovan
  0 siblings, 1 reply; 2+ messages in thread
From: Andre Guedes @ 2012-07-23 21:19 UTC (permalink / raw)
  To: linux-bluetooth

This patch removes hdev locking in hci_user_passkey_request_evt
since it is not needed. mgmt_user_passkey_request simply calls
mgmt_event which does not require hdev locking at all.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
---
 net/bluetooth/hci_event.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 41ff978..a6c509d 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -3252,12 +3252,8 @@ static void hci_user_passkey_request_evt(struct hci_dev *hdev,
 
 	BT_DBG("%s", hdev->name);
 
-	hci_dev_lock(hdev);
-
 	if (test_bit(HCI_MGMT, &hdev->dev_flags))
 		mgmt_user_passkey_request(hdev, &ev->bdaddr, ACL_LINK, 0);
-
-	hci_dev_unlock(hdev);
 }
 
 static void hci_simple_pair_complete_evt(struct hci_dev *hdev,
-- 
1.7.11.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Bluetooth: Remove locking in hci_user_passkey_request_evt
  2012-07-23 21:19 [PATCH] Bluetooth: Remove locking in hci_user_passkey_request_evt Andre Guedes
@ 2012-07-24 23:42 ` Gustavo Padovan
  0 siblings, 0 replies; 2+ messages in thread
From: Gustavo Padovan @ 2012-07-24 23:42 UTC (permalink / raw)
  To: Andre Guedes; +Cc: linux-bluetooth

Hi Andre,

* Andre Guedes <andre.guedes@openbossa.org> [2012-07-23 18:19:04 -0300]:

> This patch removes hdev locking in hci_user_passkey_request_evt
> since it is not needed. mgmt_user_passkey_request simply calls
> mgmt_event which does not require hdev locking at all.
> 
> Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
> ---
>  net/bluetooth/hci_event.c | 4 ----
>  1 file changed, 4 deletions(-)

Patch has been applied to bluuetooth-next. Thanks.

	Gustavo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-07-24 23:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-23 21:19 [PATCH] Bluetooth: Remove locking in hci_user_passkey_request_evt Andre Guedes
2012-07-24 23:42 ` Gustavo Padovan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).