LF-5353: dmaengine: imx-sdma: optimize confused runtime related code
authorJoy Zou <joy.zou@nxp.com>
Tue, 25 Jan 2022 12:11:37 +0000 (20:11 +0800)
committerJosep Orga <jorga@somdevices.com>
Tue, 27 Jun 2023 14:03:26 +0000 (16:03 +0200)
commitd73af669d125b844123f5ceb1d8a1467ca5aba48
tree37f67c272859e802e7a9d70f6e9c7e66883cfbc4
parent0131adacab7db825784a7f407221331d41a303f3
LF-5353: dmaengine: imx-sdma: optimize confused runtime related code

In order to call sdma_runtime_resume, the driver call pm_runtime_get_sync
and pm_runtime_enable when the pm_runtime is false, it may be confused.
The handler of true and false pm_runtime are mixed in sdma_remove function.

This patch calls directly sdma_runtime_resume and remove pm_runtime_enable
when the pm_runtime is false, and separate the handler of true and false
pm_runtime.

Signed-off-by: Joy Zou <joy.zou@nxp.com>
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
drivers/dma/imx-sdma.c