Skip to content

Commit

Permalink
Bluetooth: hci_qca: only assign wakeup with serial port support
Browse files Browse the repository at this point in the history
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 <jiangzp@google.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
  • Loading branch information
Zhengping Jiang authored and Luiz Augusto von Dentz committed Dec 12, 2022
1 parent d11ab69 commit e9b3e5b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/bluetooth/hci_qca.c
Original file line number Diff line number Diff line change
Expand Up @@ -1765,7 +1765,8 @@ static int qca_setup(struct hci_uart *hu)
qca_debugfs_init(hdev);
hu->hdev->hw_error = qca_hw_error;
hu->hdev->cmd_timeout = qca_cmd_timeout;
hu->hdev->wakeup = qca_wakeup;
if (device_can_wakeup(hu->serdev->ctrl->dev.parent))
hu->hdev->wakeup = qca_wakeup;
} else if (ret == -ENOENT) {
/* No patch/nvm-config found, run with original fw/config */
set_bit(QCA_ROM_FW, &qca->flags);
Expand Down

0 comments on commit e9b3e5b

Please sign in to comment.