diff options
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r-- | drivers/bluetooth/btusb.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 7665347238c7..b4756a6a3a68 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c | |||
@@ -519,7 +519,7 @@ static int btusb_open(struct hci_dev *hdev) | |||
519 | 519 | ||
520 | err = btusb_submit_intr_urb(hdev); | 520 | err = btusb_submit_intr_urb(hdev); |
521 | if (err < 0) { | 521 | if (err < 0) { |
522 | clear_bit(BTUSB_INTR_RUNNING, &hdev->flags); | 522 | clear_bit(BTUSB_INTR_RUNNING, &data->flags); |
523 | clear_bit(HCI_RUNNING, &hdev->flags); | 523 | clear_bit(HCI_RUNNING, &hdev->flags); |
524 | } | 524 | } |
525 | 525 | ||
@@ -535,8 +535,10 @@ static int btusb_close(struct hci_dev *hdev) | |||
535 | if (!test_and_clear_bit(HCI_RUNNING, &hdev->flags)) | 535 | if (!test_and_clear_bit(HCI_RUNNING, &hdev->flags)) |
536 | return 0; | 536 | return 0; |
537 | 537 | ||
538 | cancel_work_sync(&data->work); | ||
539 | |||
538 | clear_bit(BTUSB_ISOC_RUNNING, &data->flags); | 540 | clear_bit(BTUSB_ISOC_RUNNING, &data->flags); |
539 | usb_kill_anchored_urbs(&data->intr_anchor); | 541 | usb_kill_anchored_urbs(&data->isoc_anchor); |
540 | 542 | ||
541 | clear_bit(BTUSB_BULK_RUNNING, &data->flags); | 543 | clear_bit(BTUSB_BULK_RUNNING, &data->flags); |
542 | usb_kill_anchored_urbs(&data->bulk_anchor); | 544 | usb_kill_anchored_urbs(&data->bulk_anchor); |