driver usb: fix std xhci resume error

Change-Id: I61cc3dd12ca1fa8ef5166b72687309692a7abd14
This commit is contained in:
hlb194802
2024-02-20 02:45:04 +00:00
committed by Han Gao
parent 9d3e776a62
commit 15d53ae438

View File

@@ -488,25 +488,25 @@ static int __maybe_unused xhci_plat_suspend(struct device *dev)
* xhci_suspend() needs `do_wakeup` to know whether host is allowed
* to do wakeup during suspend.
*/
ret = xhci_suspend(xhci, device_may_wakeup(dev));
if (!ret) {
pm_runtime_disable(dev);
pm_runtime_set_suspended(dev);
}
return ret;
return xhci_suspend(xhci, device_may_wakeup(dev));
}
static int __maybe_unused xhci_plat_resume(struct device *dev)
{
struct usb_hcd *hcd = dev_get_drvdata(dev);
struct xhci_hcd *xhci = hcd_to_xhci(hcd);
int ret;
ret = xhci_priv_resume_quirk(hcd);
if (ret)
return ret;
/* call xhci_suspend in xhci_plat_runtime_suspend */
ret = xhci_resume(xhci, 0);
if (ret)
return ret;
pm_runtime_disable(dev);
pm_runtime_set_active(dev);
pm_runtime_enable(dev);
return 0;