summaryrefslogtreecommitdiff
path: root/drivers/bluetooth/hci_serdev.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-08-01 17:42:58 -0700
committerDavid S. Miller <davem@davemloft.net>2017-08-01 17:42:58 -0700
commit906a039d2f92c910e5c79a52da018b262bcd73b2 (patch)
tree1353a895f843176d47b4456af042b67713475336 /drivers/bluetooth/hci_serdev.c
parentc613c209c3f351d47158f728271d0c73b6dd24c6 (diff)
parentd829b9e230f4138fb6194e854e1bb46f737f1c3d (diff)
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
Johan Hedberg says: ==================== pull request: bluetooth-next 2017-08-01 Here's our first batch of Bluetooth patches for the 4.14 kernel: - Several new USB IDs for the btusb driver - Memory leak fix in btusb driver - Cleanups & fixes to hci_nokia, hci_serdev and hci_bcm drivers - Fixed cleanup path in mrf24j40 (802.15.4) driver probe function - A few other smaller cleanups & fixes to drivers Please let me know if there are any issues pulling. Thanks. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/bluetooth/hci_serdev.c')
-rw-r--r--drivers/bluetooth/hci_serdev.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/bluetooth/hci_serdev.c b/drivers/bluetooth/hci_serdev.c
index aea930101dd2..b725ac4f7ff6 100644
--- a/drivers/bluetooth/hci_serdev.c
+++ b/drivers/bluetooth/hci_serdev.c
@@ -354,3 +354,16 @@ err_alloc:
return err;
}
EXPORT_SYMBOL_GPL(hci_uart_register_device);
+
+void hci_uart_unregister_device(struct hci_uart *hu)
+{
+ struct hci_dev *hdev = hu->hdev;
+
+ hci_unregister_dev(hdev);
+ hci_free_dev(hdev);
+
+ cancel_work_sync(&hu->write_work);
+
+ hu->proto->close(hu);
+}
+EXPORT_SYMBOL_GPL(hci_uart_unregister_device);