Skip to content

Commit

Permalink
MIPS: lantiq: Use dma_zalloc_coherent() in dma code
Browse files Browse the repository at this point in the history
Instead of using dma_alloc_coherent() and memset() directly use
dma_zalloc_coherent().

Signed-off-by: Hauke Mehrtens <[email protected]>
Signed-off-by: Paul Burton <[email protected]>
Patchwork: https://patchwork.linux-mips.org/patch/19962/
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
  • Loading branch information
hauke authored and paulburton committed Jul 23, 2018
1 parent a307188 commit 2b5c491
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arch/mips/lantiq/xway/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,9 @@ ltq_dma_alloc(struct ltq_dma_channel *ch)
unsigned long flags;

ch->desc = 0;
ch->desc_base = dma_alloc_coherent(NULL,
ch->desc_base = dma_zalloc_coherent(NULL,
LTQ_DESC_NUM * LTQ_DESC_SIZE,
&ch->phys, GFP_ATOMIC);
memset(ch->desc_base, 0, LTQ_DESC_NUM * LTQ_DESC_SIZE);

spin_lock_irqsave(&ltq_dma_lock, flags);
ltq_dma_w32(ch->nr, LTQ_DMA_CS);
Expand Down

0 comments on commit 2b5c491

Please sign in to comment.