Commit 5d4d4dfb authored by Amelie Delaunay's avatar Amelie Delaunay Committed by Vinod Koul

dmaengine: stm32-dma: clean channel configuration when channel is freed

When dma_channel_release is called, it means that the channel won't be used
anymore with the configuration it had. To ensure a future client can safely
use the channel after it has been released, clean the configuration done
when channel was requested.
Signed-off-by: default avatarAmelie Delaunay <amelie.delaunay@st.com>
Link: https://lore.kernel.org/r/20201120143320.30367-3-amelie.delaunay@st.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent a44d9d72
...@@ -1220,6 +1220,8 @@ static void stm32_dma_free_chan_resources(struct dma_chan *c) ...@@ -1220,6 +1220,8 @@ static void stm32_dma_free_chan_resources(struct dma_chan *c)
pm_runtime_put(dmadev->ddev.dev); pm_runtime_put(dmadev->ddev.dev);
vchan_free_chan_resources(to_virt_chan(c)); vchan_free_chan_resources(to_virt_chan(c));
stm32_dma_clear_reg(&chan->chan_reg);
chan->threshold = 0;
} }
static void stm32_dma_desc_free(struct virt_dma_desc *vdesc) static void stm32_dma_desc_free(struct virt_dma_desc *vdesc)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment