summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAbhishek Pandit-Subedi <abhishekpandit@chromium.org>2020-06-24 11:24:30 -0700
committerMarcel Holtmann <marcel@holtmann.org>2020-06-24 20:28:32 +0200
commit34a68655a1414a34cc950b7fc5478a1b4f0db9b8 (patch)
treed364a54ac65e782e56cb685862647deabaa9421d /drivers
parent6933568aec92dd6432207baaf59378d01f55a14f (diff)
downloadlinux-34a68655a1414a34cc950b7fc5478a1b4f0db9b8.tar.bz2
Bluetooth: btusb: BTUSB_WAKEUP_DISABLE prevents wake
When the BTUSB_WAKEUP_DISABLE flag is set, always return true for prevent wake. This tells the suspend notifier not to prepare the controller for reconnections during suspend. Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/bluetooth/btusb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index df46b2a34c18..1ac6fd7c4534 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -3743,6 +3743,9 @@ static bool btusb_prevent_wake(struct hci_dev *hdev)
{
struct btusb_data *data = hci_get_drvdata(hdev);
+ if (test_bit(BTUSB_WAKEUP_DISABLE, &data->flags))
+ return true;
+
return !device_may_wakeup(&data->udev->dev);
}