提交 37f5258d 编写于 作者: I Ian Molton 提交者: Marcel Holtmann

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: NIan Molton <ian@mnementh.co.uk>
Reviewed-by: NSebastian Reichel <sebastian.reichel@collabor.co.uk>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 05f2a0bc
...@@ -742,14 +742,8 @@ static int hci_ti_probe(struct serdev_device *serdev) ...@@ -742,14 +742,8 @@ static int hci_ti_probe(struct serdev_device *serdev)
static void hci_ti_remove(struct serdev_device *serdev) static void hci_ti_remove(struct serdev_device *serdev)
{ {
struct ll_device *lldev = serdev_device_get_drvdata(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_uart_unregister_device(&lldev->hu);
hci_unregister_dev(hdev);
hci_free_dev(hdev);
hu->proto->close(hu);
} }
static const struct of_device_id hci_ti_of_match[] = { static const struct of_device_id hci_ti_of_match[] = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册