Skip to content

Commit

Permalink
ASoC: qcom: lpass-platform: Replace card->dev with component->dev
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ajit Pandey authored and Mark Brown committed Aug 17, 2020

Unverified

No user is associated with the committer email.
1 parent a503567 commit 7847718
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sound/soc/qcom/lpass-platform.c
Original file line number Diff line number Diff line change
@@ -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(

0 comments on commit 7847718

Please sign in to comment.