rt2x00: Use dma_zalloc_coherent
Use the zeroing function instead of dma_alloc_coherent & memset(,0,) Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
a4068323d5
commit
df6e633323
@@ -119,14 +119,12 @@ static int rt2x00mmio_alloc_queue_dma(struct rt2x00_dev *rt2x00dev,
|
|||||||
/*
|
/*
|
||||||
* Allocate DMA memory for descriptor and buffer.
|
* Allocate DMA memory for descriptor and buffer.
|
||||||
*/
|
*/
|
||||||
addr = dma_alloc_coherent(rt2x00dev->dev,
|
addr = dma_zalloc_coherent(rt2x00dev->dev,
|
||||||
queue->limit * queue->desc_size,
|
queue->limit * queue->desc_size, &dma,
|
||||||
&dma, GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
if (!addr)
|
if (!addr)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
memset(addr, 0, queue->limit * queue->desc_size);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize all queue entries to contain valid addresses.
|
* Initialize all queue entries to contain valid addresses.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user