aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-06-16 03:17:09 -0400
committerTakashi Iwai <tiwai@suse.de>2017-06-16 05:10:05 -0400
commit15b5ef42904bdaf20f0145c3693a7d2f3c10ab44 (patch)
tree206a0b902b48d5273548ec58b1fbe1d4c2af4923
parentba61faf0d75df9537393b2b796df41c30dcfcce7 (diff)
ALSA: hal2: switch to dma_alloc_attrs
Use dma_alloc_attrs directly instead of the dma_alloc_noncoherent wrapper. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/mips/hal2.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/sound/mips/hal2.c b/sound/mips/hal2.c
index 6505deb8c06b..3318c15e324a 100644
--- a/sound/mips/hal2.c
+++ b/sound/mips/hal2.c
@@ -461,15 +461,15 @@ static int hal2_alloc_dmabuf(struct hal2_codec *codec)
461 int count = H2_BUF_SIZE / H2_BLOCK_SIZE; 461 int count = H2_BUF_SIZE / H2_BLOCK_SIZE;
462 int i; 462 int i;
463 463
464 codec->buffer = dma_alloc_noncoherent(NULL, H2_BUF_SIZE, 464 codec->buffer = dma_alloc_attrs(NULL, H2_BUF_SIZE, &buffer_dma,
465 &buffer_dma, GFP_KERNEL); 465 GFP_KERNEL, DMA_ATTR_NON_CONSISTENT);
466 if (!codec->buffer) 466 if (!codec->buffer)
467 return -ENOMEM; 467 return -ENOMEM;
468 desc = dma_alloc_noncoherent(NULL, count * sizeof(struct hal2_desc), 468 desc = dma_alloc_attrs(NULL, count * sizeof(struct hal2_desc),
469 &desc_dma, GFP_KERNEL); 469 &desc_dma, GFP_KERNEL, DMA_ATTR_NON_CONSISTENT);
470 if (!desc) { 470 if (!desc) {
471 dma_free_noncoherent(NULL, H2_BUF_SIZE, 471 dma_free_attrs(NULL, H2_BUF_SIZE, codec->buffer, buffer_dma,
472 codec->buffer, buffer_dma); 472 DMA_ATTR_NON_CONSISTENT);
473 return -ENOMEM; 473 return -ENOMEM;
474 } 474 }
475 codec->buffer_dma = buffer_dma; 475 codec->buffer_dma = buffer_dma;
@@ -490,10 +490,10 @@ static int hal2_alloc_dmabuf(struct hal2_codec *codec)
490 490
491static void hal2_free_dmabuf(struct hal2_codec *codec) 491static void hal2_free_dmabuf(struct hal2_codec *codec)
492{ 492{
493 dma_free_noncoherent(NULL, codec->desc_count * sizeof(struct hal2_desc), 493 dma_free_attrs(NULL, codec->desc_count * sizeof(struct hal2_desc),
494 codec->desc, codec->desc_dma); 494 codec->desc, codec->desc_dma, DMA_ATTR_NON_CONSISTENT);
495 dma_free_noncoherent(NULL, H2_BUF_SIZE, codec->buffer, 495 dma_free_attrs(NULL, H2_BUF_SIZE, codec->buffer, codec->buffer_dma,
496 codec->buffer_dma); 496 DMA_ATTR_NON_CONSISTENT);
497} 497}
498 498
499static struct snd_pcm_hardware hal2_pcm_hw = { 499static struct snd_pcm_hardware hal2_pcm_hw = {