aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/hci_vhci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/bluetooth/hci_vhci.c')
-rw-r--r--drivers/bluetooth/hci_vhci.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c
index d5cde6d86f89..7595274103fd 100644
--- a/drivers/bluetooth/hci_vhci.c
+++ b/drivers/bluetooth/hci_vhci.c
@@ -41,8 +41,6 @@
41 41
42#define VERSION "1.3" 42#define VERSION "1.3"
43 43
44static int minor = MISC_DYNAMIC_MINOR;
45
46struct vhci_data { 44struct vhci_data {
47 struct hci_dev *hdev; 45 struct hci_dev *hdev;
48 46
@@ -218,12 +216,6 @@ static unsigned int vhci_poll(struct file *file, poll_table *wait)
218 return POLLOUT | POLLWRNORM; 216 return POLLOUT | POLLWRNORM;
219} 217}
220 218
221static int vhci_ioctl(struct inode *inode, struct file *file,
222 unsigned int cmd, unsigned long arg)
223{
224 return -EINVAL;
225}
226
227static int vhci_open(struct inode *inode, struct file *file) 219static int vhci_open(struct inode *inode, struct file *file)
228{ 220{
229 struct vhci_data *data; 221 struct vhci_data *data;
@@ -284,10 +276,10 @@ static int vhci_release(struct inode *inode, struct file *file)
284} 276}
285 277
286static const struct file_operations vhci_fops = { 278static const struct file_operations vhci_fops = {
279 .owner = THIS_MODULE,
287 .read = vhci_read, 280 .read = vhci_read,
288 .write = vhci_write, 281 .write = vhci_write,
289 .poll = vhci_poll, 282 .poll = vhci_poll,
290 .ioctl = vhci_ioctl,
291 .open = vhci_open, 283 .open = vhci_open,
292 .release = vhci_release, 284 .release = vhci_release,
293}; 285};
@@ -302,18 +294,12 @@ static int __init vhci_init(void)
302{ 294{
303 BT_INFO("Virtual HCI driver ver %s", VERSION); 295 BT_INFO("Virtual HCI driver ver %s", VERSION);
304 296
305 if (misc_register(&vhci_miscdev) < 0) { 297 return misc_register(&vhci_miscdev);
306 BT_ERR("Can't register misc device with minor %d", minor);
307 return -EIO;
308 }
309
310 return 0;
311} 298}
312 299
313static void __exit vhci_exit(void) 300static void __exit vhci_exit(void)
314{ 301{
315 if (misc_deregister(&vhci_miscdev) < 0) 302 misc_deregister(&vhci_miscdev);
316 BT_ERR("Can't unregister misc device with minor %d", minor);
317} 303}
318 304
319module_init(vhci_init); 305module_init(vhci_init);