aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@googlemail.com>2012-01-07 09:47:22 -0500
committerJohan Hedberg <johan.hedberg@intel.com>2012-02-13 10:01:24 -0500
commite9b9cfa1575e37cb2dbb5534aeaaa16814228887 (patch)
tree4f0a8e2a1c9b8776b1c637df081792b5dda88cd3 /drivers/bluetooth
parent46e06531a5ae13c66f774d3cb1ad78385618a5a2 (diff)
Bluetooth: Remove HCI-owner field
After unregistering an hci_dev object a bluetooth driver does not have any callbacks in the hci_dev structure left over. Therefore, there is no need to keep a reference to the module. Previously, we needed this to protect the hci-destruct callback. However, this callback is no longer available so we do not need this owner field, anymore. Drivers now call hci_unregister_dev() and they are done with the object. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r--drivers/bluetooth/bfusb.c2
-rw-r--r--drivers/bluetooth/bluecard_cs.c2
-rw-r--r--drivers/bluetooth/bpa10x.c2
-rw-r--r--drivers/bluetooth/bt3c_cs.c2
-rw-r--r--drivers/bluetooth/btmrvl_main.c1
-rw-r--r--drivers/bluetooth/btsdio.c2
-rw-r--r--drivers/bluetooth/btuart_cs.c2
-rw-r--r--drivers/bluetooth/btusb.c2
-rw-r--r--drivers/bluetooth/btwilink.c1
-rw-r--r--drivers/bluetooth/dtl1_cs.c2
-rw-r--r--drivers/bluetooth/hci_ldisc.c2
-rw-r--r--drivers/bluetooth/hci_vhci.c2
12 files changed, 0 insertions, 22 deletions
diff --git a/drivers/bluetooth/bfusb.c b/drivers/bluetooth/bfusb.c
index e99ce89e1ca..c7d6ff0ffcf 100644
--- a/drivers/bluetooth/bfusb.c
+++ b/drivers/bluetooth/bfusb.c
@@ -705,8 +705,6 @@ static int bfusb_probe(struct usb_interface *intf, const struct usb_device_id *i
705 hdev->send = bfusb_send_frame; 705 hdev->send = bfusb_send_frame;
706 hdev->ioctl = bfusb_ioctl; 706 hdev->ioctl = bfusb_ioctl;
707 707
708 hdev->owner = THIS_MODULE;
709
710 if (hci_register_dev(hdev) < 0) { 708 if (hci_register_dev(hdev) < 0) {
711 BT_ERR("Can't register HCI device"); 709 BT_ERR("Can't register HCI device");
712 hci_free_dev(hdev); 710 hci_free_dev(hdev);
diff --git a/drivers/bluetooth/bluecard_cs.c b/drivers/bluetooth/bluecard_cs.c
index 5cb325a1374..6b1261f9deb 100644
--- a/drivers/bluetooth/bluecard_cs.c
+++ b/drivers/bluetooth/bluecard_cs.c
@@ -738,8 +738,6 @@ static int bluecard_open(bluecard_info_t *info)
738 hdev->send = bluecard_hci_send_frame; 738 hdev->send = bluecard_hci_send_frame;
739 hdev->ioctl = bluecard_hci_ioctl; 739 hdev->ioctl = bluecard_hci_ioctl;
740 740
741 hdev->owner = THIS_MODULE;
742
743 id = inb(iobase + 0x30); 741 id = inb(iobase + 0x30);
744 742
745 if ((id & 0x0f) == 0x02) 743 if ((id & 0x0f) == 0x02)
diff --git a/drivers/bluetooth/bpa10x.c b/drivers/bluetooth/bpa10x.c
index 29cd11d401e..9d635148104 100644
--- a/drivers/bluetooth/bpa10x.c
+++ b/drivers/bluetooth/bpa10x.c
@@ -470,8 +470,6 @@ static int bpa10x_probe(struct usb_interface *intf, const struct usb_device_id *
470 hdev->flush = bpa10x_flush; 470 hdev->flush = bpa10x_flush;
471 hdev->send = bpa10x_send_frame; 471 hdev->send = bpa10x_send_frame;
472 472
473 hdev->owner = THIS_MODULE;
474
475 set_bit(HCI_QUIRK_NO_RESET, &hdev->quirks); 473 set_bit(HCI_QUIRK_NO_RESET, &hdev->quirks);
476 474
477 err = hci_register_dev(hdev); 475 err = hci_register_dev(hdev);
diff --git a/drivers/bluetooth/bt3c_cs.c b/drivers/bluetooth/bt3c_cs.c
index e74334dfc77..0e304cb4bde 100644
--- a/drivers/bluetooth/bt3c_cs.c
+++ b/drivers/bluetooth/bt3c_cs.c
@@ -584,8 +584,6 @@ static int bt3c_open(bt3c_info_t *info)
584 hdev->send = bt3c_hci_send_frame; 584 hdev->send = bt3c_hci_send_frame;
585 hdev->ioctl = bt3c_hci_ioctl; 585 hdev->ioctl = bt3c_hci_ioctl;
586 586
587 hdev->owner = THIS_MODULE;
588
589 /* Load firmware */ 587 /* Load firmware */
590 err = request_firmware(&firmware, "BT3CPCC.bin", &info->p_dev->dev); 588 err = request_firmware(&firmware, "BT3CPCC.bin", &info->p_dev->dev);
591 if (err < 0) { 589 if (err < 0) {
diff --git a/drivers/bluetooth/btmrvl_main.c b/drivers/bluetooth/btmrvl_main.c
index 995cf43f4bd..66b58fd09fb 100644
--- a/drivers/bluetooth/btmrvl_main.c
+++ b/drivers/bluetooth/btmrvl_main.c
@@ -550,7 +550,6 @@ int btmrvl_register_hdev(struct btmrvl_private *priv)
550 hdev->flush = btmrvl_flush; 550 hdev->flush = btmrvl_flush;
551 hdev->send = btmrvl_send_frame; 551 hdev->send = btmrvl_send_frame;
552 hdev->ioctl = btmrvl_ioctl; 552 hdev->ioctl = btmrvl_ioctl;
553 hdev->owner = THIS_MODULE;
554 553
555 btmrvl_send_module_cfg_cmd(priv, MODULE_BRINGUP_REQ); 554 btmrvl_send_module_cfg_cmd(priv, MODULE_BRINGUP_REQ);
556 555
diff --git a/drivers/bluetooth/btsdio.c b/drivers/bluetooth/btsdio.c
index d38945cc9f0..2d6e4ed1637 100644
--- a/drivers/bluetooth/btsdio.c
+++ b/drivers/bluetooth/btsdio.c
@@ -337,8 +337,6 @@ static int btsdio_probe(struct sdio_func *func,
337 hdev->flush = btsdio_flush; 337 hdev->flush = btsdio_flush;
338 hdev->send = btsdio_send_frame; 338 hdev->send = btsdio_send_frame;
339 339
340 hdev->owner = THIS_MODULE;
341
342 err = hci_register_dev(hdev); 340 err = hci_register_dev(hdev);
343 if (err < 0) { 341 if (err < 0) {
344 hci_free_dev(hdev); 342 hci_free_dev(hdev);
diff --git a/drivers/bluetooth/btuart_cs.c b/drivers/bluetooth/btuart_cs.c
index 84e02f1a45b..80ad2b9b352 100644
--- a/drivers/bluetooth/btuart_cs.c
+++ b/drivers/bluetooth/btuart_cs.c
@@ -502,8 +502,6 @@ static int btuart_open(btuart_info_t *info)
502 hdev->send = btuart_hci_send_frame; 502 hdev->send = btuart_hci_send_frame;
503 hdev->ioctl = btuart_hci_ioctl; 503 hdev->ioctl = btuart_hci_ioctl;
504 504
505 hdev->owner = THIS_MODULE;
506
507 spin_lock_irqsave(&(info->lock), flags); 505 spin_lock_irqsave(&(info->lock), flags);
508 506
509 /* Reset UART */ 507 /* Reset UART */
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 44b5e736ddc..a36888a9c20 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -997,8 +997,6 @@ static int btusb_probe(struct usb_interface *intf,
997 hdev->send = btusb_send_frame; 997 hdev->send = btusb_send_frame;
998 hdev->notify = btusb_notify; 998 hdev->notify = btusb_notify;
999 999
1000 hdev->owner = THIS_MODULE;
1001
1002 /* Interface numbers are hardcoded in the specification */ 1000 /* Interface numbers are hardcoded in the specification */
1003 data->isoc = usb_ifnum_to_if(data->udev, 1); 1001 data->isoc = usb_ifnum_to_if(data->udev, 1);
1004 1002
diff --git a/drivers/bluetooth/btwilink.c b/drivers/bluetooth/btwilink.c
index da9cf6a6e8a..b81b32e4fa1 100644
--- a/drivers/bluetooth/btwilink.c
+++ b/drivers/bluetooth/btwilink.c
@@ -317,7 +317,6 @@ static int bt_ti_probe(struct platform_device *pdev)
317 hdev->close = ti_st_close; 317 hdev->close = ti_st_close;
318 hdev->flush = NULL; 318 hdev->flush = NULL;
319 hdev->send = ti_st_send_frame; 319 hdev->send = ti_st_send_frame;
320 hdev->owner = THIS_MODULE;
321 320
322 err = hci_register_dev(hdev); 321 err = hci_register_dev(hdev);
323 if (err < 0) { 322 if (err < 0) {
diff --git a/drivers/bluetooth/dtl1_cs.c b/drivers/bluetooth/dtl1_cs.c
index aae40caaa18..295cf1b4a05 100644
--- a/drivers/bluetooth/dtl1_cs.c
+++ b/drivers/bluetooth/dtl1_cs.c
@@ -484,8 +484,6 @@ static int dtl1_open(dtl1_info_t *info)
484 hdev->send = dtl1_hci_send_frame; 484 hdev->send = dtl1_hci_send_frame;
485 hdev->ioctl = dtl1_hci_ioctl; 485 hdev->ioctl = dtl1_hci_ioctl;
486 486
487 hdev->owner = THIS_MODULE;
488
489 spin_lock_irqsave(&(info->lock), flags); 487 spin_lock_irqsave(&(info->lock), flags);
490 488
491 /* Reset UART */ 489 /* Reset UART */
diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
index 5ea49df3462..459ff0ba5a4 100644
--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -392,8 +392,6 @@ static int hci_uart_register_dev(struct hci_uart *hu)
392 hdev->send = hci_uart_send_frame; 392 hdev->send = hci_uart_send_frame;
393 hdev->parent = hu->tty->dev; 393 hdev->parent = hu->tty->dev;
394 394
395 hdev->owner = THIS_MODULE;
396
397 if (!reset) 395 if (!reset)
398 set_bit(HCI_QUIRK_NO_RESET, &hdev->quirks); 396 set_bit(HCI_QUIRK_NO_RESET, &hdev->quirks);
399 397
diff --git a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c
index 44a801292d6..5f305c131a0 100644
--- a/drivers/bluetooth/hci_vhci.c
+++ b/drivers/bluetooth/hci_vhci.c
@@ -244,8 +244,6 @@ static int vhci_open(struct inode *inode, struct file *file)
244 hdev->flush = vhci_flush; 244 hdev->flush = vhci_flush;
245 hdev->send = vhci_send_frame; 245 hdev->send = vhci_send_frame;
246 246
247 hdev->owner = THIS_MODULE;
248
249 if (hci_register_dev(hdev) < 0) { 247 if (hci_register_dev(hdev) < 0) {
250 BT_ERR("Can't register HCI device"); 248 BT_ERR("Can't register HCI device");
251 kfree(data); 249 kfree(data);