mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 23:58:05 +00:00
Bluetooth: Re-order clearing suspend tasks
Unregister_pm_notifier is a blocking call so suspend tasks should be
cleared beforehand. Otherwise, the notifier will wait for completion
before returning (and we encounter a 2s timeout on resume).
Fixes: 0e9952804e
(Bluetooth: Clear suspend tasks on unregister)
Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
parent
c6db014381
commit
3eec158d5e
1 changed files with 1 additions and 1 deletions
|
@ -3794,8 +3794,8 @@ void hci_unregister_dev(struct hci_dev *hdev)
|
||||||
|
|
||||||
cancel_work_sync(&hdev->power_on);
|
cancel_work_sync(&hdev->power_on);
|
||||||
|
|
||||||
unregister_pm_notifier(&hdev->suspend_notifier);
|
|
||||||
hci_suspend_clear_tasks(hdev);
|
hci_suspend_clear_tasks(hdev);
|
||||||
|
unregister_pm_notifier(&hdev->suspend_notifier);
|
||||||
cancel_work_sync(&hdev->suspend_prepare);
|
cancel_work_sync(&hdev->suspend_prepare);
|
||||||
|
|
||||||
hci_dev_do_close(hdev);
|
hci_dev_do_close(hdev);
|
||||||
|
|
Loading…
Reference in a new issue