Skip to content

Commit e9b3e5b

Browse files
Zhengping JiangVudentz
authored andcommitted
Bluetooth: hci_qca: only assign wakeup with serial port support
Only assign hdev->wakeup if the serial port supports wakeup. Otherwise it will fall back to the hci_uart_wakeup or the behavior that can be overridden before calling the hci_uart_register_device(). Signed-off-by: Zhengping Jiang <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent d11ab69 commit e9b3e5b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/bluetooth/hci_qca.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1765,7 +1765,8 @@ static int qca_setup(struct hci_uart *hu)
17651765
qca_debugfs_init(hdev);
17661766
hu->hdev->hw_error = qca_hw_error;
17671767
hu->hdev->cmd_timeout = qca_cmd_timeout;
1768-
hu->hdev->wakeup = qca_wakeup;
1768+
if (device_can_wakeup(hu->serdev->ctrl->dev.parent))
1769+
hu->hdev->wakeup = qca_wakeup;
17691770
} else if (ret == -ENOENT) {
17701771
/* No patch/nvm-config found, run with original fw/config */
17711772
set_bit(QCA_ROM_FW, &qca->flags);

0 commit comments

Comments
 (0)