mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-03-03 09:13:36 +07:00
Bluetooth: hci_core: cancel power off delayed work properly
When the HCI_AUTO_OFF flag is cleared, the power_off delayed work need to be cancel or HCI will be powered off even if it's managed. Signed-off-by: Wei-Ning Huang <wnhuang@chromium.org> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
parent
28c971d82f
commit
d82142a8b1
@ -2021,6 +2021,7 @@ static void hci_power_on(struct work_struct *work)
|
||||
if (test_bit(HCI_UP, &hdev->flags) &&
|
||||
hci_dev_test_flag(hdev, HCI_MGMT) &&
|
||||
hci_dev_test_and_clear_flag(hdev, HCI_AUTO_OFF)) {
|
||||
cancel_delayed_work(&hdev->power_off);
|
||||
hci_req_sync_lock(hdev);
|
||||
err = __hci_req_hci_power_on(hdev);
|
||||
hci_req_sync_unlock(hdev);
|
||||
|
Loading…
Reference in New Issue
Block a user