diff mbox series

[4/4] dmaengine: mediatek: do not hold the spinlock for vchan_dma_desc_free_list

Message ID CABnWg9s9nbqm3bMv7oWgDw2zvaB3tcHttk9n9Jia4aZ_tdvK=g@mail.gmail.com (mailing list archive)
State Superseded
Headers show
Series [1/4] dmaengine: mediatek: free the proper desc in desc_free handler | expand

Commit Message

Guillaume Ranquet May 3, 2021, 3:26 p.m. UTC
As there is no need to hold the spinlock for dma_desc_free_list,
Move it oustide the spinlock section.

Signed-off-by: Guillaume Ranquet <granquet@baylibre.com>

diff mbox series


diff --git a/drivers/dma/mediatek/mtk-uart-apdma.c
index 4711bec04b98..ba43708f2a93 100644
--- a/drivers/dma/mediatek/mtk-uart-apdma.c
+++ b/drivers/dma/mediatek/mtk-uart-apdma.c
@@ -431,8 +431,8 @@  static int mtk_uart_apdma_terminate_all(struct
dma_chan *chan)

 	spin_lock_irqsave(&c->vc.lock, flags);
 	vchan_get_all_descriptors(&c->vc, &head);
-	vchan_dma_desc_free_list(&c->vc, &head);
 	spin_unlock_irqrestore(&c->vc.lock, flags);
+	vchan_dma_desc_free_list(&c->vc, &head);

 	return 0;