diff options
author | David Herrmann <dh.herrmann@googlemail.com> | 2011-10-26 04:43:18 -0400 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-11-07 14:24:41 -0500 |
commit | 13ea4015d37d2dbe597580898b5fafbe6f593f72 (patch) | |
tree | 820d0bcde2da968160403c15f9fe17600a886b5f | |
parent | 96af7391b752cf3d2de3aef8f03c45ba76d3ac5e (diff) |
Bluetooth: Ignore hci_unregister_dev return value
Make all bluetooth drivers ignore the return value of hci_unregister_dev as it
always returns 0. In the next step, hci_unregister_dev can be modified to return
void.
Some of the drivers already ignore the return value (including btusb), hence,
this will increase consitency in the bluetooth drivers.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
-rw-r--r-- | drivers/bluetooth/bfusb.c | 4 | ||||
-rw-r--r-- | drivers/bluetooth/bluecard_cs.c | 4 | ||||
-rw-r--r-- | drivers/bluetooth/bt3c_cs.c | 4 | ||||
-rw-r--r-- | drivers/bluetooth/btuart_cs.c | 4 | ||||
-rw-r--r-- | drivers/bluetooth/dtl1_cs.c | 4 | ||||
-rw-r--r-- | drivers/bluetooth/hci_vhci.c | 5 |
6 files changed, 6 insertions, 19 deletions
diff --git a/drivers/bluetooth/bfusb.c b/drivers/bluetooth/bfusb.c index 005919ab043c..6580d5057d26 100644 --- a/drivers/bluetooth/bfusb.c +++ b/drivers/bluetooth/bfusb.c | |||
@@ -750,9 +750,7 @@ static void bfusb_disconnect(struct usb_interface *intf) | |||
750 | 750 | ||
751 | bfusb_close(hdev); | 751 | bfusb_close(hdev); |
752 | 752 | ||
753 | if (hci_unregister_dev(hdev) < 0) | 753 | hci_unregister_dev(hdev); |
754 | BT_ERR("Can't unregister HCI device %s", hdev->name); | ||
755 | |||
756 | hci_free_dev(hdev); | 754 | hci_free_dev(hdev); |
757 | } | 755 | } |
758 | 756 | ||
diff --git a/drivers/bluetooth/bluecard_cs.c b/drivers/bluetooth/bluecard_cs.c index aed1904ea67b..c6a0c6103743 100644 --- a/drivers/bluetooth/bluecard_cs.c +++ b/drivers/bluetooth/bluecard_cs.c | |||
@@ -844,9 +844,7 @@ static int bluecard_close(bluecard_info_t *info) | |||
844 | /* Turn FPGA off */ | 844 | /* Turn FPGA off */ |
845 | outb(0x80, iobase + 0x30); | 845 | outb(0x80, iobase + 0x30); |
846 | 846 | ||
847 | if (hci_unregister_dev(hdev) < 0) | 847 | hci_unregister_dev(hdev); |
848 | BT_ERR("Can't unregister HCI device %s", hdev->name); | ||
849 | |||
850 | hci_free_dev(hdev); | 848 | hci_free_dev(hdev); |
851 | 849 | ||
852 | return 0; | 850 | return 0; |
diff --git a/drivers/bluetooth/bt3c_cs.c b/drivers/bluetooth/bt3c_cs.c index 4fc01949d399..0c97e5d514b6 100644 --- a/drivers/bluetooth/bt3c_cs.c +++ b/drivers/bluetooth/bt3c_cs.c | |||
@@ -636,9 +636,7 @@ static int bt3c_close(bt3c_info_t *info) | |||
636 | 636 | ||
637 | bt3c_hci_close(hdev); | 637 | bt3c_hci_close(hdev); |
638 | 638 | ||
639 | if (hci_unregister_dev(hdev) < 0) | 639 | hci_unregister_dev(hdev); |
640 | BT_ERR("Can't unregister HCI device %s", hdev->name); | ||
641 | |||
642 | hci_free_dev(hdev); | 640 | hci_free_dev(hdev); |
643 | 641 | ||
644 | return 0; | 642 | return 0; |
diff --git a/drivers/bluetooth/btuart_cs.c b/drivers/bluetooth/btuart_cs.c index 526b61807d94..200b3a2877d6 100644 --- a/drivers/bluetooth/btuart_cs.c +++ b/drivers/bluetooth/btuart_cs.c | |||
@@ -565,9 +565,7 @@ static int btuart_close(btuart_info_t *info) | |||
565 | 565 | ||
566 | spin_unlock_irqrestore(&(info->lock), flags); | 566 | spin_unlock_irqrestore(&(info->lock), flags); |
567 | 567 | ||
568 | if (hci_unregister_dev(hdev) < 0) | 568 | hci_unregister_dev(hdev); |
569 | BT_ERR("Can't unregister HCI device %s", hdev->name); | ||
570 | |||
571 | hci_free_dev(hdev); | 569 | hci_free_dev(hdev); |
572 | 570 | ||
573 | return 0; | 571 | return 0; |
diff --git a/drivers/bluetooth/dtl1_cs.c b/drivers/bluetooth/dtl1_cs.c index 5e4c2de9fc3f..969bb22e493f 100644 --- a/drivers/bluetooth/dtl1_cs.c +++ b/drivers/bluetooth/dtl1_cs.c | |||
@@ -551,9 +551,7 @@ static int dtl1_close(dtl1_info_t *info) | |||
551 | 551 | ||
552 | spin_unlock_irqrestore(&(info->lock), flags); | 552 | spin_unlock_irqrestore(&(info->lock), flags); |
553 | 553 | ||
554 | if (hci_unregister_dev(hdev) < 0) | 554 | hci_unregister_dev(hdev); |
555 | BT_ERR("Can't unregister HCI device %s", hdev->name); | ||
556 | |||
557 | hci_free_dev(hdev); | 555 | hci_free_dev(hdev); |
558 | 556 | ||
559 | return 0; | 557 | return 0; |
diff --git a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c index 67c180c2c1e0..2e302a11ab55 100644 --- a/drivers/bluetooth/hci_vhci.c +++ b/drivers/bluetooth/hci_vhci.c | |||
@@ -264,10 +264,7 @@ static int vhci_release(struct inode *inode, struct file *file) | |||
264 | struct vhci_data *data = file->private_data; | 264 | struct vhci_data *data = file->private_data; |
265 | struct hci_dev *hdev = data->hdev; | 265 | struct hci_dev *hdev = data->hdev; |
266 | 266 | ||
267 | if (hci_unregister_dev(hdev) < 0) { | 267 | hci_unregister_dev(hdev); |
268 | BT_ERR("Can't unregister HCI device %s", hdev->name); | ||
269 | } | ||
270 | |||
271 | hci_free_dev(hdev); | 268 | hci_free_dev(hdev); |
272 | 269 | ||
273 | file->private_data = NULL; | 270 | file->private_data = NULL; |