Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Amelie Delaunay <amelie.delaunay@st.com>
Link: https://lore.kernel.org/r/20201120143320.30367-3-amelie.delaunay@st.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Amelie Delaunay and committed by
Vinod Koul
5d4d4dfb a44d9d72

+2
+2
drivers/dma/stm32-dma.c
··· 1220 1220 pm_runtime_put(dmadev->ddev.dev); 1221 1221 1222 1222 vchan_free_chan_resources(to_virt_chan(c)); 1223 + stm32_dma_clear_reg(&chan->chan_reg); 1224 + chan->threshold = 0; 1223 1225 } 1224 1226 1225 1227 static void stm32_dma_desc_free(struct virt_dma_desc *vdesc)