summaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3/core.c
diff options
context:
space:
mode:
authorJohan Hovold <johan+linaro@kernel.org>2023-04-04 09:25:16 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-04-20 10:18:06 +0200
commit6b3b2402ca5be6a19f92968a5654bc64d3996d16 (patch)
treefa6438a96b2b52cc27d605f2843c2b9c510e8aa1 /drivers/usb/dwc3/core.c
parent44d257e9012ee8040e41d224d0e5bfb5ef5427ea (diff)
downloadlinux-stable-6b3b2402ca5be6a19f92968a5654bc64d3996d16.tar.gz
linux-stable-6b3b2402ca5be6a19f92968a5654bc64d3996d16.tar.bz2
linux-stable-6b3b2402ca5be6a19f92968a5654bc64d3996d16.zip
USB: dwc3: disable autosuspend on unbind
Add the missing calls to disable autosuspend on probe errors and on driver unbind. Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20230404072524.19014-4-johan+linaro@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/dwc3/core.c')
-rw-r--r--drivers/usb/dwc3/core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index ad48b7ebd880..bb737c3bd58a 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -1966,6 +1966,7 @@ err3:
err2:
pm_runtime_allow(dev);
pm_runtime_disable(dev);
+ pm_runtime_dont_use_autosuspend(dev);
pm_runtime_set_suspended(dev);
pm_runtime_put_noidle(dev);
disable_clks:
@@ -1993,6 +1994,7 @@ static int dwc3_remove(struct platform_device *pdev)
pm_runtime_allow(&pdev->dev);
pm_runtime_disable(&pdev->dev);
+ pm_runtime_dont_use_autosuspend(&pdev->dev);
pm_runtime_put_noidle(&pdev->dev);
pm_runtime_set_suspended(&pdev->dev);