Browse Source

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 <[email protected]>
Banajit Goswami 6 years ago
parent
commit
bfc919ea43
1 changed files with 2 additions and 4 deletions
  1. 2 4
      dsp/msm_audio_ion.c

+ 2 - 4
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;
 	}