Skip to content

Commit

Permalink
ASoC: tegra: Simplify with dma_set_mask_and_coherent()
Browse files Browse the repository at this point in the history
ASoC tegra PCM code still has explicit calls of dma_set_mask() and
dma_set_coherent_mask().

Let's simplify with dma_set_mask_and_coherent().

Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Jonathan Hunter <jonathanh@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20210114133337.1039-4-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Takashi Iwai authored and Mark Brown committed Jan 19, 2021
1 parent ab152af commit 7cc206b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions sound/soc/tegra/tegra_pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,11 +255,7 @@ static int tegra_pcm_dma_allocate(struct snd_soc_pcm_runtime *rtd,
struct snd_pcm *pcm = rtd->pcm;
int ret;

ret = dma_set_mask(card->dev, DMA_BIT_MASK(32));
if (ret < 0)
return ret;

ret = dma_set_coherent_mask(card->dev, DMA_BIT_MASK(32));
ret = dma_set_mask_and_coherent(card->dev, DMA_BIT_MASK(32));
if (ret < 0)
return ret;

Expand Down

0 comments on commit 7cc206b

Please sign in to comment.