summaryrefslogtreecommitdiff
path: root/drivers/dma
diff options
context:
space:
mode:
authorFancy Fang <chen.fang@nxp.com>2016-04-22 13:42:09 +0800
committerFancy Fang <chen.fang@nxp.com>2016-04-22 15:46:15 +0800
commitd8eb77c0d3189d84df4cb28cc960c31e7fae30dd (patch)
tree08c6090b011ddc813c6aed8055f05f59a9149de8 /drivers/dma
parente6248666311cc6ea01a9cf9c68b53bc5c49a7e2c (diff)
MLK-12695 dma: pxp-v2: fixing the mismatch calls of pm_runtime suspend/resume
The 'pm_runtime_get_sync()' and 'pm_runtime_put_sync_suspend()' may be called not pairs. And this will cause the 'usage_count' to be negative. Signed-off-by: Fancy Fang <chen.fang@nxp.com> (cherry picked from commit 10135c736dfc1b3d5c449adb78118e3642b99276)
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/pxp/pxp_dma_v2.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/dma/pxp/pxp_dma_v2.c b/drivers/dma/pxp/pxp_dma_v2.c
index de679b06945c..0128881a1690 100644
--- a/drivers/dma/pxp/pxp_dma_v2.c
+++ b/drivers/dma/pxp/pxp_dma_v2.c
@@ -1125,11 +1125,10 @@ static void pxp_clk_disable(struct pxps *pxp)
if (pxp->clk_disp_axi)
clk_disable_unprepare(pxp->clk_disp_axi);
pxp->clk_stat = CLK_STAT_OFF;
+ pm_runtime_put_sync_suspend(pxp->dev);
} else
spin_unlock_irqrestore(&pxp->lock, flags);
- pm_runtime_put_sync_suspend(pxp->dev);
-
mutex_unlock(&pxp->clk_mutex);
}