|
@@ -523,13 +523,13 @@ static void hci_uart_tty_close(struct tty_struct *tty)
|
|
|
if (hdev)
|
|
|
hci_uart_close(hdev);
|
|
|
|
|
|
- cancel_work_sync(&hu->write_work);
|
|
|
-
|
|
|
if (test_bit(HCI_UART_PROTO_READY, &hu->flags)) {
|
|
|
percpu_down_write(&hu->proto_lock);
|
|
|
clear_bit(HCI_UART_PROTO_READY, &hu->flags);
|
|
|
percpu_up_write(&hu->proto_lock);
|
|
|
|
|
|
+ cancel_work_sync(&hu->write_work);
|
|
|
+
|
|
|
if (hdev) {
|
|
|
if (test_bit(HCI_UART_REGISTERED, &hu->flags))
|
|
|
hci_unregister_dev(hdev);
|