diff options
author | Abhishek Pandit-Subedi <abhishekpandit@chromium.org> | 2020-09-10 02:53:59 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-10-29 12:07:37 +0300 |
commit | dc7285e0f1f8d6c831ead32fd934de678ba2aae1 (patch) | |
tree | a5414ab7fbae62d7b4b107a298a91a6211fecfa9 /net | |
parent | 8141ec5a8f5a788cd41c7efe73824d2d018b0a07 (diff) | |
download | linux-dc7285e0f1f8d6c831ead32fd934de678ba2aae1.tar.xz |
Bluetooth: Re-order clearing suspend tasks
[ Upstream commit 3eec158d5eca7dd455118d9e00568aad2371219f ]
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: 0e9952804ec9c8 (Bluetooth: Clear suspend tasks on unregister)
Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/hci_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 0f4e5a31f983..131d29e902a3 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -3618,8 +3618,8 @@ void hci_unregister_dev(struct hci_dev *hdev) cancel_work_sync(&hdev->power_on); - unregister_pm_notifier(&hdev->suspend_notifier); hci_suspend_clear_tasks(hdev); + unregister_pm_notifier(&hdev->suspend_notifier); cancel_work_sync(&hdev->suspend_prepare); hci_dev_do_close(hdev); |