* [PATCH] dmaengine: stm32-dmamux: Fix PM disable depth imbalance in stm32_dmamux_probe
@ 2022-01-08 8:53 Miaoqian Lin
2022-01-10 16:11 ` [Linux-stm32] " Amelie DELAUNAY
2022-02-15 5:28 ` Vinod Koul
0 siblings, 2 replies; 3+ messages in thread
From: Miaoqian Lin @ 2022-01-08 8:53 UTC (permalink / raw)
Cc: linmq006, Vinod Koul, Maxime Coquelin, Alexandre Torgue,
Pierre-Yves MORDRET, dmaengine, linux-stm32, linux-arm-kernel,
linux-kernel
The pm_runtime_enable will increase power disable depth.
If the probe fails, we should use pm_runtime_disable() to balance
pm_runtime_enable().
Fixes: 4f3ceca254e0 ("dmaengine: stm32-dmamux: Add PM Runtime support")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
---
drivers/dma/stm32-dmamux.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/dma/stm32-dmamux.c b/drivers/dma/stm32-dmamux.c
index a42164389ebc..d5d55732adba 100644
--- a/drivers/dma/stm32-dmamux.c
+++ b/drivers/dma/stm32-dmamux.c
@@ -292,10 +292,12 @@ static int stm32_dmamux_probe(struct platform_device *pdev)
ret = of_dma_router_register(node, stm32_dmamux_route_allocate,
&stm32_dmamux->dmarouter);
if (ret)
- goto err_clk;
+ goto pm_disable;
return 0;
+pm_disable:
+ pm_runtime_disable(&pdev->dev);
err_clk:
clk_disable_unprepare(stm32_dmamux->clk);
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Linux-stm32] [PATCH] dmaengine: stm32-dmamux: Fix PM disable depth imbalance in stm32_dmamux_probe
2022-01-08 8:53 [PATCH] dmaengine: stm32-dmamux: Fix PM disable depth imbalance in stm32_dmamux_probe Miaoqian Lin
@ 2022-01-10 16:11 ` Amelie DELAUNAY
2022-02-15 5:28 ` Vinod Koul
1 sibling, 0 replies; 3+ messages in thread
From: Amelie DELAUNAY @ 2022-01-10 16:11 UTC (permalink / raw)
To: Miaoqian Lin
Cc: Alexandre Torgue, Pierre-Yves MORDRET, linux-kernel, Vinod Koul,
Maxime Coquelin, dmaengine, linux-stm32, linux-arm-kernel
On 1/8/22 9:53 AM, Miaoqian Lin wrote:
> The pm_runtime_enable will increase power disable depth.
> If the probe fails, we should use pm_runtime_disable() to balance
> pm_runtime_enable().
>
> Fixes: 4f3ceca254e0 ("dmaengine: stm32-dmamux: Add PM Runtime support")
> Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Thanks for your patch,
Reviewed-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
> ---
> drivers/dma/stm32-dmamux.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/dma/stm32-dmamux.c b/drivers/dma/stm32-dmamux.c
> index a42164389ebc..d5d55732adba 100644
> --- a/drivers/dma/stm32-dmamux.c
> +++ b/drivers/dma/stm32-dmamux.c
> @@ -292,10 +292,12 @@ static int stm32_dmamux_probe(struct platform_device *pdev)
> ret = of_dma_router_register(node, stm32_dmamux_route_allocate,
> &stm32_dmamux->dmarouter);
> if (ret)
> - goto err_clk;
> + goto pm_disable;
>
> return 0;
>
> +pm_disable:
> + pm_runtime_disable(&pdev->dev);
> err_clk:
> clk_disable_unprepare(stm32_dmamux->clk);
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dmaengine: stm32-dmamux: Fix PM disable depth imbalance in stm32_dmamux_probe
2022-01-08 8:53 [PATCH] dmaengine: stm32-dmamux: Fix PM disable depth imbalance in stm32_dmamux_probe Miaoqian Lin
2022-01-10 16:11 ` [Linux-stm32] " Amelie DELAUNAY
@ 2022-02-15 5:28 ` Vinod Koul
1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2022-02-15 5:28 UTC (permalink / raw)
To: Miaoqian Lin
Cc: Maxime Coquelin, Alexandre Torgue, Pierre-Yves MORDRET,
dmaengine, linux-stm32, linux-arm-kernel, linux-kernel
On 08-01-22, 08:53, Miaoqian Lin wrote:
> The pm_runtime_enable will increase power disable depth.
> If the probe fails, we should use pm_runtime_disable() to balance
> pm_runtime_enable().
Applied, thanks
--
~Vinod
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-02-15 5:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-08 8:53 [PATCH] dmaengine: stm32-dmamux: Fix PM disable depth imbalance in stm32_dmamux_probe Miaoqian Lin
2022-01-10 16:11 ` [Linux-stm32] " Amelie DELAUNAY
2022-02-15 5:28 ` Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).