Skip to contentSkip to conversation

dmaengine: tegra210-adma: fix pm runtime unbalance in tegra_adma_remove

PATCH Applied Dongliang Mu 3 participants 3 messages Oct 21, 2021 – Oct 25, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dmaengine: tegra210-adma: fix pm runtime unbalance in tegra_adma_remove

Since pm_runtime_put is done when tegra_adma_probe is successful, we cannot do pm_runtime_put_sync again in tegra_adma_remove.

Fix this by removing the pm_runtime_put_sync in tegra_adma_remove.

---
 drivers/dma/tegra210-adma.c | 1 -
 1 file changed, 1 deletion(-)
drivers/dma/tegra210-adma.c +0 -1
index b1115a6d1935..7e4d40cd9577 100644
@@ -940,7 +940,6 @@ static int tegra_adma_remove(struct platform_device *pdev)
 	for (i = 0; i < tdma->nr_channels; ++i)
 		irq_dispose_mapping(tdma->channels[i].irq);
 
-	pm_runtime_put_sync(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
 
 	return 0;
Signature · 1 line
2.25.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 16 lines · Dongliang Mu

Since pm_runtime_put is done when tegra_adma_probe is successful, we cannot do pm_runtime_put_sync again in tegra_adma_remove.

Fix this by removing the pm_runtime_put_sync in tegra_adma_remove.

---
  drivers/dma/tegra210-adma.c | 1 -
  1 file changed, 1 deletion(-)
drivers/dma/tegra210-adma.c +0 -0
index b1115a6d1935..7e4d40cd9577 100644

drivers/dma/tegra210-adma.c static int tegra_adma_remove(struct platform_device *pdev) · line 945

Quoted 7 lines
drivers/dma/tegra210-adma.c +0 -1
@@ -940,7 +940,6 @@ static int tegra_adma_remove(struct platform_device *pdev)
  	for (i = 0; i < tdma->nr_channels; ++i)
  		irq_dispose_mapping(tdma->channels[i].irq);
 
-	pm_runtime_put_sync(&pdev->dev);
  	pm_runtime_disable(&pdev->dev);
 
  	return 0;

Thanks!

Jon

Signature · 1 line
nvpublic
maintainer Applied
#2 lore raw
In reply to Dongliang Mu
Quoted 4 lines · Dongliang Mu

Since pm_runtime_put is done when tegra_adma_probe is successful, we cannot do pm_runtime_put_sync again in tegra_adma_remove.

Fix this by removing the pm_runtime_put_sync in tegra_adma_remove.

Applied, thanks

Signature · 1 line
~Vinod