Bluetooth: hci_qca: get wakeup status from serdev device handle
authorZhengping Jiang <jiangzp@google.com>
Thu, 2 Feb 2023 17:47:01 +0000 (09:47 -0800)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Thu, 9 Feb 2023 22:19:08 +0000 (14:19 -0800)
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 <jiangzp@google.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
drivers/bluetooth/hci_qca.c

index a5c19f32926b597d8429f38874144318fbe67a94..3df8c3606e9336f9a7906e3a0ae78ce2aba4f0be 100644 (file)
@@ -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;