diff mbox series

dmaengine: xilinx_dma: Alloc tx descriptors GFP_NOWAIT

Message ID 20210129170800.31857-1-rf@opensource.cirrus.com (mailing list archive)
State New, archived
Headers show
Series dmaengine: xilinx_dma: Alloc tx descriptors GFP_NOWAIT | expand

Commit Message

Richard Fitzgerald Jan. 29, 2021, 5:08 p.m. UTC
Use GFP_NOWAIT allocation in xilinx_dma_alloc_tx_descriptor().

This is necessary for compatibility with ALSA, which calls
dmaengine_prep_dma_cyclic() from an atomic context.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
 drivers/dma/xilinx/xilinx_dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Vinod Koul Feb. 1, 2021, 9:56 a.m. UTC | #1
On 29-01-21, 17:08, Richard Fitzgerald wrote:
> Use GFP_NOWAIT allocation in xilinx_dma_alloc_tx_descriptor().
> 
> This is necessary for compatibility with ALSA, which calls
> dmaengine_prep_dma_cyclic() from an atomic context.

Applied, thanks
diff mbox series

Patch

diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c
index 22faea653ea8..fb046af9ac53 100644
--- a/drivers/dma/xilinx/xilinx_dma.c
+++ b/drivers/dma/xilinx/xilinx_dma.c
@@ -800,7 +800,7 @@  xilinx_dma_alloc_tx_descriptor(struct xilinx_dma_chan *chan)
 {
 	struct xilinx_dma_tx_descriptor *desc;
 
-	desc = kzalloc(sizeof(*desc), GFP_KERNEL);
+	desc = kzalloc(sizeof(*desc), GFP_NOWAIT);
 	if (!desc)
 		return NULL;