Bluetooth: Remove BKL from open callback of virtual driver
authorMarcel Holtmann <marcel@holtmann.org>
Mon, 8 Jun 2009 12:24:03 +0000 (14:24 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 8 Jun 2009 12:50:01 +0000 (14:50 +0200)
The BKL push down added some BKL into the open callback of the virtual
driver. The driver is really simple and need no such locking and so just
remove it.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/hci_vhci.c

index 0f5e04934cec05a20753febcedfd5ab1c66538c5..7ebdb1d309392bb9f6ba16d639e859a7ea113d06 100644 (file)
@@ -246,11 +246,9 @@ static int vhci_open(struct inode *inode, struct file *file)
        skb_queue_head_init(&data->readq);
        init_waitqueue_head(&data->read_wait);
 
-       lock_kernel();
        hdev = hci_alloc_dev();
        if (!hdev) {
                kfree(data);
-               unlock_kernel();
                return -ENOMEM;
        }
 
@@ -271,12 +269,10 @@ static int vhci_open(struct inode *inode, struct file *file)
                BT_ERR("Can't register HCI device");
                kfree(data);
                hci_free_dev(hdev);
-               unlock_kernel();
                return -EBUSY;
        }
 
        file->private_data = data;
-       unlock_kernel();
 
        return nonseekable_open(inode, file);
 }