[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1594748508-22179-3-git-send-email-yibin.gong@nxp.com>
Date: Wed, 15 Jul 2020 01:41:41 +0800
From: Robin Gong <yibin.gong@....com>
To: vkoul@...nel.org, robh+dt@...nel.org, shawnguo@...nel.org,
s.hauer@...gutronix.de, festevam@...il.com,
catalin.marinas@....com, will@...nel.org, dan.j.williams@...el.com,
angelo@...am.it
Cc: kernel@...gutronix.de, linux-imx@....com,
dmaengine@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: [PATCH v2 2/9] dmaengine: fsl-edma-common: add condition check for fsl_edma_chan_mux
Since next edma3 don't have dmamux, add condition check in the common
fsl_edma_free_chan_resources().
Signed-off-by: Robin Gong <yibin.gong@....com>
---
drivers/dma/fsl-edma-common.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/dma/fsl-edma-common.c b/drivers/dma/fsl-edma-common.c
index ef5294f0..d19e8a8 100644
--- a/drivers/dma/fsl-edma-common.c
+++ b/drivers/dma/fsl-edma-common.c
@@ -642,7 +642,10 @@ void fsl_edma_free_chan_resources(struct dma_chan *chan)
spin_lock_irqsave(&fsl_chan->vchan.lock, flags);
fsl_chan->edma->drvdata->dis_req(fsl_chan);
- fsl_edma_chan_mux(fsl_chan, 0, false);
+
+ if (fsl_chan->edma->drvdata->dmamuxs)
+ fsl_edma_chan_mux(fsl_chan, 0, false);
+
fsl_chan->edesc = NULL;
vchan_get_all_descriptors(&fsl_chan->vchan, &head);
fsl_edma_unprep_slave_dma(fsl_chan);
--
2.7.4
Powered by blists - more mailing lists