From: Biju Das <biju.das.jz@bp.renesas.com>
As per the suspend_devices_and_enter(), if .suspend() fails, it invoke the
.resume() callback. Currently ohci_resume() is called in 2 times if the
reset_control_assert fails in ohci_platform_suspend(). Drop the duplicate
ohci_resume() from ohci_platform_suspend() callback, as it is called
later from ohci_platform_resume() callback.
Also, drop the other duplicate callback pdata->power_on().
Fixes: e4d9da32bf60 ("usb: host: ohci-platform: Call reset assert/deassert on suspend/resume")
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
drivers/usb/host/ohci-platform.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/usb/host/ohci-platform.c b/drivers/usb/host/ohci-platform.c
index 2e4bb5cc2165..5342cffbee47 100644
--- a/drivers/usb/host/ohci-platform.c
+++ b/drivers/usb/host/ohci-platform.c
@@ -281,15 +281,7 @@ static int ohci_platform_suspend(struct device *dev)
if (pdata->power_suspend)
pdata->power_suspend(pdev);
- ret = reset_control_assert(priv->resets);
- if (ret) {
- if (pdata->power_on)
- pdata->power_on(pdev);
-
- ohci_resume(hcd, false);
- }
-
- return ret;
+ return reset_control_assert(priv->resets);
}
static int ohci_platform_resume_common(struct device *dev, bool hibernated)
--
2.43.0