diff options
author | Takashi Iwai <tiwai@suse.de> | 2021-01-14 14:33:36 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-01-19 14:06:11 +0000 |
commit | ab152afa2427bb3e4eea7c9f21c4393287838774 (patch) | |
tree | bf39bb7afab84e6863311cb2a93a9d65cc1e5aa8 | |
parent | d3afb00220becf81bc2d9016f04e05949dfd5bb2 (diff) | |
download | linux-stable-ab152afa2427bb3e4eea7c9f21c4393287838774.tar.gz linux-stable-ab152afa2427bb3e4eea7c9f21c4393287838774.tar.bz2 linux-stable-ab152afa2427bb3e4eea7c9f21c4393287838774.zip |
ASoC: SOF: intel: Simplify with dma_set_mask_and_coherent()
ASoC Intel SOF driver still has explicit calls of dma_set_mask() and
dma_set_coherent_mask().
Let's simplify with dma_set_mask_and_coherent().
Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Cc: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20210114133337.1039-3-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/sof/intel/hda.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c index 509a9b256423..7e703ce22fcd 100644 --- a/sound/soc/sof/intel/hda.c +++ b/sound/soc/sof/intel/hda.c @@ -809,13 +809,9 @@ int hda_dsp_probe(struct snd_sof_dev *sdev) sdev->mailbox_bar = HDA_DSP_BAR; /* allow 64bit DMA address if supported by H/W */ - if (!dma_set_mask(&pci->dev, DMA_BIT_MASK(64))) { - dev_dbg(sdev->dev, "DMA mask is 64 bit\n"); - dma_set_coherent_mask(&pci->dev, DMA_BIT_MASK(64)); - } else { + if (dma_set_mask_and_coherent(&pci->dev, DMA_BIT_MASK(64))) { dev_dbg(sdev->dev, "DMA mask is 32 bit\n"); - dma_set_mask(&pci->dev, DMA_BIT_MASK(32)); - dma_set_coherent_mask(&pci->dev, DMA_BIT_MASK(32)); + dma_set_mask_and_coherent(&pci->dev, DMA_BIT_MASK(32)); } /* init streams */ |