From d188b9586c5542fa5ec7b4d3d62a52585f2406c1 Mon Sep 17 00:00:00 2001 From: Banajit Goswami Date: Sat, 3 Mar 2018 01:24:56 -0800 Subject: [PATCH] dsp: update dma_buf cache ops Update the API call sequence for cache operation for dma_buf. Change-Id: I79ee36d083460b47c792120a857e92f26d9e3fe2 Signed-off-by: Banajit Goswami --- dsp/msm_audio_ion.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/dsp/msm_audio_ion.c b/dsp/msm_audio_ion.c index 6ba29dce10..a544dde71a 100644 --- a/dsp/msm_audio_ion.c +++ b/dsp/msm_audio_ion.c @@ -599,18 +599,11 @@ int msm_audio_ion_cache_operations(struct audio_buffer *abuff, int cache_op) /* MSM_AUDIO_ION_INV_CACHES or MSM_AUDIO_ION_CLEAN_CACHES */ switch (cache_op) { case MSM_AUDIO_ION_INV_CACHES: - rc = dma_buf_begin_cpu_access(abuff->dma_buf, - DMA_BIDIRECTIONAL); - if (rc) - pr_err("%s: failed to invalidate caches. rc = %d\n", - __func__, rc); - break; case MSM_AUDIO_ION_CLEAN_CACHES: - rc = dma_buf_end_cpu_access(abuff->dma_buf, - DMA_BIDIRECTIONAL); - if (rc) - pr_err("%s: failed to clean caches. rc = %d\n", - __func__, rc); + dma_buf_begin_cpu_access(abuff->dma_buf, + DMA_BIDIRECTIONAL); + dma_buf_end_cpu_access(abuff->dma_buf, + DMA_BIDIRECTIONAL); break; default: pr_err("%s: Invalid cache operation %d\n",