diff options
author | Srinivas Kandagatla <srinivas.kandagatla@linaro.org> | 2017-01-27 19:52:37 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2017-01-27 20:03:27 +0200 |
commit | 0de4df5ba2ad3f3c46d2c079f3a76c69d71800be (patch) | |
tree | fe0be790ad0edaa195fc4c17801953a21baf11b2 /drivers/net/wireless/ath/ath10k/ce.c | |
parent | dd51fa3d8a1d4781647f333e731590b65965b332 (diff) | |
download | op-kernel-dev-0de4df5ba2ad3f3c46d2c079f3a76c69d71800be.zip op-kernel-dev-0de4df5ba2ad3f3c46d2c079f3a76c69d71800be.tar.gz |
ath10k: use dma_zalloc_coherent()
use dma_zalloc_coherent() instead of dma_alloc_coherent and memset().
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/ce.c')
-rw-r--r-- | drivers/net/wireless/ath/ath10k/ce.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/net/wireless/ath/ath10k/ce.c b/drivers/net/wireless/ath/ath10k/ce.c index c04e687..da466ab 100644 --- a/drivers/net/wireless/ath/ath10k/ce.c +++ b/drivers/net/wireless/ath/ath10k/ce.c @@ -958,7 +958,7 @@ ath10k_ce_alloc_dest_ring(struct ath10k *ar, unsigned int ce_id, * coherent DMA are unsupported */ dest_ring->base_addr_owner_space_unaligned = - dma_alloc_coherent(ar->dev, + dma_zalloc_coherent(ar->dev, (nentries * sizeof(struct ce_desc) + CE_DESC_RING_ALIGN), &base_addr, GFP_KERNEL); @@ -969,13 +969,6 @@ ath10k_ce_alloc_dest_ring(struct ath10k *ar, unsigned int ce_id, dest_ring->base_addr_ce_space_unaligned = base_addr; - /* - * Correctly initialize memory to 0 to prevent garbage - * data crashing system when download firmware - */ - memset(dest_ring->base_addr_owner_space_unaligned, 0, - nentries * sizeof(struct ce_desc) + CE_DESC_RING_ALIGN); - dest_ring->base_addr_owner_space = PTR_ALIGN( dest_ring->base_addr_owner_space_unaligned, CE_DESC_RING_ALIGN); |