summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFancy Fang <chen.fang@nxp.com>2016-04-22 13:42:09 +0800
committerFrank Li <Frank.Li@nxp.com>2016-05-23 15:05:12 -0500
commitaca13862759eed46d7ec9cc61170e5243b8865b9 (patch)
tree18d463b7b7f266ffc820e9630d6fbe39e47d42f4
parent3455774b8d912721a81e46e7a7acb353ddc2ff85 (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)
-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);
}