summaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/hci_ll.c
diff options
context:
space:
mode:
authorIan Molton2017-07-08 18:37:43 +0200
committerMarcel Holtmann2017-07-20 11:18:36 +0200
commit37f5258d1cde34e73a5ce3dfe00a80274e299c72 (patch)
tree06dd57e41ff7907c0485b796c4b82a33a02cb683 /drivers/bluetooth/hci_ll.c
parentBluetooth: hci_nokia: Use new hci_uart_unregister_device() function (diff)
downloadkernel-qcow2-linux-37f5258d1cde34e73a5ce3dfe00a80274e299c72.tar.gz
kernel-qcow2-linux-37f5258d1cde34e73a5ce3dfe00a80274e299c72.tar.xz
kernel-qcow2-linux-37f5258d1cde34e73a5ce3dfe00a80274e299c72.zip
Bluetooth: hci_ll: Use new hci_uart_unregister_device() function
Convert hci_ll to use hci_uart_unregister_device(). This simplifies the _remove() handler as well as fixes a potential race condition on unload. Signed-off-by: Ian Molton <ian@mnementh.co.uk> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabor.co.uk> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth/hci_ll.c')
-rw-r--r--drivers/bluetooth/hci_ll.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/bluetooth/hci_ll.c b/drivers/bluetooth/hci_ll.c
index c982943f0747..1b898445a0b8 100644
--- a/drivers/bluetooth/hci_ll.c
+++ b/drivers/bluetooth/hci_ll.c
@@ -742,14 +742,8 @@ static int hci_ti_probe(struct serdev_device *serdev)
static void hci_ti_remove(struct serdev_device *serdev)
{
struct ll_device *lldev = serdev_device_get_drvdata(serdev);
- struct hci_uart *hu = &lldev->hu;
- struct hci_dev *hdev = hu->hdev;
- cancel_work_sync(&hu->write_work);
-
- hci_unregister_dev(hdev);
- hci_free_dev(hdev);
- hu->proto->close(hu);
+ hci_uart_unregister_device(&lldev->hu);
}
static const struct of_device_id hci_ti_of_match[] = {