]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
Bluetooth: Convert hdev->req_lock to a mutex
authorThomas Gleixner <tglx@linutronix.de>
Sun, 26 Jul 2009 08:18:19 +0000 (08:18 +0000)
committerMarcel Holtmann <marcel@holtmann.org>
Sat, 22 Aug 2009 21:35:02 +0000 (14:35 -0700)
hdev->req_lock is used as mutex so make it a mutex.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
include/net/bluetooth/hci_core.h
net/bluetooth/hci_core.c

index 25b8a0345a6aa78a669850b5b3814bd42071078f..7b640aeddb64d81af0c608becdc6d88631686773 100644 (file)
@@ -117,7 +117,7 @@ struct hci_dev {
        struct sk_buff          *sent_cmd;
        struct sk_buff          *reassembly[3];
 
-       struct semaphore        req_lock;
+       struct mutex            req_lock;
        wait_queue_head_t       req_wait_q;
        __u32                   req_status;
        __u32                   req_result;
@@ -704,8 +704,8 @@ struct hci_sec_filter {
 #define HCI_REQ_PEND     1
 #define HCI_REQ_CANCELED  2
 
-#define hci_req_lock(d)                down(&d->req_lock)
-#define hci_req_unlock(d)      up(&d->req_lock)
+#define hci_req_lock(d)                mutex_lock(&d->req_lock)
+#define hci_req_unlock(d)      mutex_unlock(&d->req_lock)
 
 void hci_req_complete(struct hci_dev *hdev, int result);
 
index 406ad07cdea1d21de0642ead005881c96e3d0716..e1da8f68759c3a989fc8cd8ddde64949c204f5a1 100644 (file)
@@ -911,7 +911,7 @@ int hci_register_dev(struct hci_dev *hdev)
                hdev->reassembly[i] = NULL;
 
        init_waitqueue_head(&hdev->req_wait_q);
-       init_MUTEX(&hdev->req_lock);
+       mutex_init(&hdev->req_lock);
 
        inquiry_cache_init(hdev);