Signed-off-by: Arnd Bergmann <arnd@arndb.de>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/slab.h>
+#include <linux/smp_lock.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/sched.h>
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;
}
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);
}