aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/hci_vhci.c
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
committerAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
commitada47b5fe13d89735805b566185f4885f5a3f750 (patch)
tree644b88f8a71896307d71438e9b3af49126ffb22b /drivers/bluetooth/hci_vhci.c
parent43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff)
parent3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff)
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/bluetooth/hci_vhci.c')
-rw-r--r--drivers/bluetooth/hci_vhci.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c
index d5cde6d86f89..bb0aefdb4267 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;
@@ -244,7 +236,7 @@ static int vhci_open(struct inode *inode, struct file *file)
244 236
245 data->hdev = hdev; 237 data->hdev = hdev;
246 238
247 hdev->type = HCI_VIRTUAL; 239 hdev->bus = HCI_VIRTUAL;
248 hdev->driver_data = data; 240 hdev->driver_data = data;
249 241
250 hdev->open = vhci_open_dev; 242 hdev->open = vhci_open_dev;
@@ -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);