aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhengping Jiang <[email protected]>2023-02-02 09:47:01 -0800
committerLuiz Augusto von Dentz <[email protected]>2023-02-09 14:19:08 -0800
commit03b0093f7b310493bc944a20f725228cfe0d3fea (patch)
treef3310ce64f5eb96effad1a900e446a57f86bc411
parentdf5703348813235874d851934e957c3723d71644 (diff)
Bluetooth: hci_qca: get wakeup status from serdev device handle
Bluetooth controller attached via the UART is handled by the serdev driver. Get the wakeup status from the device handle through serdev, instead of the parent path. Fixes: c1a74160eaf1 ("Bluetooth: hci_qca: Add device_may_wakeup support") Signed-off-by: Zhengping Jiang <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
-rw-r--r--drivers/bluetooth/hci_qca.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index a5c19f32926b..3df8c3606e93 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -1588,10 +1588,11 @@ static bool qca_wakeup(struct hci_dev *hdev)
struct hci_uart *hu = hci_get_drvdata(hdev);
bool wakeup;
- /* UART driver handles the interrupt from BT SoC.So we need to use
- * device handle of UART driver to get the status of device may wakeup.
+ /* BT SoC attached through the serial bus is handled by the serdev driver.
+ * So we need to use the device handle of the serdev driver to get the
+ * status of device may wakeup.
*/
- wakeup = device_may_wakeup(hu->serdev->ctrl->dev.parent);
+ wakeup = device_may_wakeup(&hu->serdev->ctrl->dev);
bt_dev_dbg(hu->hdev, "wakeup status : %d", wakeup);
return wakeup;