diff options
author | Frank Li <Frank.Li@nxp.com> | 2024-06-03 11:23:16 -0400 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2024-06-11 23:55:34 +0530 |
commit | bb160502a45440d2b52c189d5a81365c01b8d494 (patch) | |
tree | 7dcc35d36a523f4a54a6f8d99b0a5b34ea25c3cb /drivers/dma/fsl-edma-main.c | |
parent | 44eb827264de4f14d8317692441e13f5e2aadbf2 (diff) |
dmaengine: fsl-edma: remove redundant "idle" field from fsl_chan
The 'idle' in fsl_chan is redundant as it's equivalent to
'status != DMA_IN_PROGRESS'. So remote it to simple code logic.
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Link: https://lore.kernel.org/r/20240603152317.69917-2-Frank.Li@nxp.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/fsl-edma-main.c')
-rw-r--r-- | drivers/dma/fsl-edma-main.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/dma/fsl-edma-main.c b/drivers/dma/fsl-edma-main.c index 346a501ab3fd..ec4f5baafad5 100644 --- a/drivers/dma/fsl-edma-main.c +++ b/drivers/dma/fsl-edma-main.c @@ -544,7 +544,6 @@ static int fsl_edma_probe(struct platform_device *pdev) fsl_chan->edma = fsl_edma; fsl_chan->pm_state = RUNNING; fsl_chan->srcid = 0; - fsl_chan->idle = true; fsl_chan->dma_dir = DMA_NONE; fsl_chan->vchan.desc_free = fsl_edma_free_desc; @@ -669,7 +668,7 @@ static int fsl_edma_suspend_late(struct device *dev) continue; spin_lock_irqsave(&fsl_chan->vchan.lock, flags); /* Make sure chan is idle or will force disable. */ - if (unlikely(!fsl_chan->idle)) { + if (unlikely(fsl_chan->status == DMA_IN_PROGRESS)) { dev_warn(dev, "WARN: There is non-idle channel."); fsl_edma_disable_request(fsl_chan); fsl_edma_chan_mux(fsl_chan, 0, false); |