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>
This commit is contained in:
Abhishek Pandit-Subedi 2020-06-24 11:24:30 -07:00 коммит произвёл Marcel Holtmann
Родитель 6933568aec
Коммит 34a68655a1
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -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);
}