diff mbox series

usb: dwc3-am62: Disable autosuspend during remove

Message ID 20241209105728.3216872-1-quic_prashk@quicinc.com
State New
Headers show
Series usb: dwc3-am62: Disable autosuspend during remove | expand

Commit Message

Prashanth K Dec. 9, 2024, 10:57 a.m. UTC
Runtime PM documentation (Section 5) mentions, during remove()
callbacks, drivers should undo the runtime PM changes done in
probe(). Usually this means calling pm_runtime_disable(),
pm_runtime_dont_use_autosuspend() etc. Hence add missing
function to disable autosuspend on dwc3-am62 driver unbind.

Fixes: e8784c0aec03 ("drivers: usb: dwc3: Add AM62 USB wrapper driver")
Cc: stable@vger.kernel.org
Signed-off-by: Prashanth K <quic_prashk@quicinc.com>
---
 drivers/usb/dwc3/dwc3-am62.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Thinh Nguyen Dec. 11, 2024, 2:20 a.m. UTC | #1
On Mon, Dec 09, 2024, Prashanth K wrote:
> Runtime PM documentation (Section 5) mentions, during remove()
> callbacks, drivers should undo the runtime PM changes done in
> probe(). Usually this means calling pm_runtime_disable(),
> pm_runtime_dont_use_autosuspend() etc. Hence add missing
> function to disable autosuspend on dwc3-am62 driver unbind.
> 
> Fixes: e8784c0aec03 ("drivers: usb: dwc3: Add AM62 USB wrapper driver")
> Cc: stable@vger.kernel.org
> Signed-off-by: Prashanth K <quic_prashk@quicinc.com>
> ---
>  drivers/usb/dwc3/dwc3-am62.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/dwc3/dwc3-am62.c b/drivers/usb/dwc3/dwc3-am62.c
> index 5e3d1741701f..7d43da5f2897 100644
> --- a/drivers/usb/dwc3/dwc3-am62.c
> +++ b/drivers/usb/dwc3/dwc3-am62.c
> @@ -309,6 +309,7 @@ static void dwc3_ti_remove(struct platform_device *pdev)
>  
>  	pm_runtime_put_sync(dev);
>  	pm_runtime_disable(dev);
> +	pm_runtime_dont_use_autosuspend(dev);
>  	pm_runtime_set_suspended(dev);
>  }
>  
> -- 
> 2.25.1
> 

Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>

Thanks,
Thinh
diff mbox series

Patch

diff --git a/drivers/usb/dwc3/dwc3-am62.c b/drivers/usb/dwc3/dwc3-am62.c
index 5e3d1741701f..7d43da5f2897 100644
--- a/drivers/usb/dwc3/dwc3-am62.c
+++ b/drivers/usb/dwc3/dwc3-am62.c
@@ -309,6 +309,7 @@  static void dwc3_ti_remove(struct platform_device *pdev)
 
 	pm_runtime_put_sync(dev);
 	pm_runtime_disable(dev);
+	pm_runtime_dont_use_autosuspend(dev);
 	pm_runtime_set_suspended(dev);
 }