ASoC: qcom: lpass-platform: Replace card->dev with component->dev
authorAjit Pandey <ajitp@codeaurora.org>
Fri, 14 Aug 2020 10:52:59 +0000 (16:22 +0530)
committerMark Brown <broonie@kernel.org>
Mon, 17 Aug 2020 13:39:27 +0000 (14:39 +0100)
We are allocating dma memory for component->dev but trying to mmap
such memory for substream->pcm->card->dev. Replace device argument
in mmap with component->dev to fix this.

Signed-off-by: Ajit Pandey <ajitp@codeaurora.org>
Signed-off-by: Rohit kumar <rohitkr@codeaurora.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/1597402388-14112-4-git-send-email-rohitkr@codeaurora.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/qcom/lpass-platform.c

index 01179bc..3697f4e 100644 (file)
@@ -400,9 +400,8 @@ static int lpass_platform_pcmops_mmap(struct snd_soc_component *component,
 {
        struct snd_pcm_runtime *runtime = substream->runtime;
 
-       return dma_mmap_coherent(substream->pcm->card->dev, vma,
-                       runtime->dma_area, runtime->dma_addr,
-                       runtime->dma_bytes);
+       return dma_mmap_coherent(component->dev, vma, runtime->dma_area,
+                                runtime->dma_addr, runtime->dma_bytes);
 }
 
 static irqreturn_t lpass_dma_interrupt_handler(