From bfc919ea4324e30f790abcddda0fa6cd63ebc010 Mon Sep 17 00:00:00 2001 From: Banajit Goswami Date: Mon, 25 Jun 2018 19:03:09 -0700 Subject: [PATCH] dsp: msm_audio_ion: check only for probe complete for ION alloc While allocating and importing ION buffers, make sure to check for probe complete flag before proceeding instead of checking for the flag AND smmu_enabled flag. This way the restriction will be centralized for either types of targets with and without SMMU. Change-Id: I558e19724d1002a602377a636e274bc90ca8262d Signed-off-by: Banajit Goswami --- dsp/msm_audio_ion.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dsp/msm_audio_ion.c b/dsp/msm_audio_ion.c index ec147fb8dd46..018b1a9c3c76 100644 --- a/dsp/msm_audio_ion.c +++ b/dsp/msm_audio_ion.c @@ -347,8 +347,7 @@ int msm_audio_ion_alloc(struct dma_buf **dma_buf, size_t bufsz, int rc = -EINVAL; unsigned long err_ion_ptr = 0; - if ((msm_audio_ion_data.smmu_enabled == true) && - !(msm_audio_ion_data.device_status & MSM_AUDIO_ION_PROBED)) { + if (!(msm_audio_ion_data.device_status & MSM_AUDIO_ION_PROBED)) { pr_debug("%s:probe is not done, deferred\n", __func__); return -EPROBE_DEFER; } @@ -412,8 +411,7 @@ int msm_audio_ion_import(struct dma_buf **dma_buf, int fd, { int rc = 0; - if ((msm_audio_ion_data.smmu_enabled == true) && - !(msm_audio_ion_data.device_status & MSM_AUDIO_ION_PROBED)) { + if (!(msm_audio_ion_data.device_status & MSM_AUDIO_ION_PROBED)) { pr_debug("%s: probe is not done, deferred\n", __func__); return -EPROBE_DEFER; }