[PATCH 1/2] usb: host: ehci-platform: Drop ehci_resume from ehci_platform_suspend()

Biju posted 2 patches 1 week, 4 days ago
[PATCH 1/2] usb: host: ehci-platform: Drop ehci_resume from ehci_platform_suspend()
Posted by Biju 1 week, 4 days ago
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 ehci_resume() is called in 2 times if the
reset_control_assert fails in ehci_platform_suspend(). Drop the duplicate
ehci_resume() from ehci_platform_suspend() callback, as it is called
later from ehci_platform_resume() callback.

Also, drop the other duplicate callbacks pdata->power_on() and
quirk_poll_init().

Fixes: c31a401fe7ab ("usb: host: ehci-platform: Call reset assert/deassert on suspend/resume")
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
 drivers/usb/host/ehci-platform.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c
index f61f095cedab..253405efe50e 100644
--- a/drivers/usb/host/ehci-platform.c
+++ b/drivers/usb/host/ehci-platform.c
@@ -454,18 +454,7 @@ static int __maybe_unused ehci_platform_suspend(struct device *dev)
 	if (pdata->power_suspend)
 		pdata->power_suspend(pdev);
 
-	ret = reset_control_assert(priv->rsts);
-	if (ret) {
-		if (pdata->power_on)
-			pdata->power_on(pdev);
-
-		ehci_resume(hcd, false);
-
-		if (priv->quirk_poll)
-			quirk_poll_init(priv);
-	}
-
-	return ret;
+	return reset_control_assert(priv->rsts);
 }
 
 static int __maybe_unused ehci_platform_resume(struct device *dev)
-- 
2.43.0