FROMGIT: Bluetooth: Clear suspend tasks on unregister

While unregistering, make sure to clear the suspend tasks before
cancelling the work. If the unregister is called during resume from
suspend, this will unnecessarily add 2s to the resume time otherwise.

Fixes: 4e8c36c3b0d73d (Bluetooth: Fix suspend notifier race)
Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
(cherry picked from commit 0e9952804ec9c8ba60f131225eab80634339f042
 https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/ master)

BUG=b:167430555, b:157448009
TEST=On Ezkinil, suspend+resume and verify resume time < 2s

Change-Id: I80ca6804558dabf8ea0ad5c4ed042f487ad5376c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2393078
Tested-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
Reviewed-by: Alain Michaud <alainm@chromium.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Commit-Queue: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
1 file changed