diff mbox series

[1/3] ASoC: intel: skl: Simplify with dma_set_mask_and_coherent()

Message ID 20210114133337.1039-2-tiwai@suse.de (mailing list archive)
State Accepted
Commit d3afb00220becf81bc2d9016f04e05949dfd5bb2
Headers show
Series ASoC: Simplify with dma_set_mask_and_coherent() | expand

Commit Message

Takashi Iwai Jan. 14, 2021, 1:33 p.m. UTC
ASoC Intel Skylake driver still has explicit calls of dma_set_mask()
and dma_set_coherent_mask().

Let's simplify with dma_set_mask_and_coherent().

Cc: Cezary Rojewski <cezary.rojewski@intel.com>
Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/soc/intel/skylake/skl.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

Comments

Cezary Rojewski Jan. 20, 2021, 4:12 p.m. UTC | #1
On 2021-01-14 2:33 PM, Takashi Iwai wrote:
> ASoC Intel Skylake driver still has explicit calls of dma_set_mask()
> and dma_set_coherent_mask().
> 
> Let's simplify with dma_set_mask_and_coherent().
> 
> Cc: Cezary Rojewski <cezary.rojewski@intel.com>
> Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> Signed-off-by: Takashi Iwai <tiwai@suse.de>

Somehow CC did not get to me.

Thanks for the patch, Takashi. Small nitpick: s/skl/Skylake/ in
commit's title. No need for resend if that's the only missing piece
found.

Acked-by: Cezary Rojewski <cezary.rojewski@intel.com>
diff mbox series

Patch

diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c
index 8b993722f74e..5b1a15e39912 100644
--- a/sound/soc/intel/skylake/skl.c
+++ b/sound/soc/intel/skylake/skl.c
@@ -950,12 +950,8 @@  static int skl_first_init(struct hdac_bus *bus)
 	bus->num_streams = cp_streams + pb_streams;
 
 	/* allow 64bit DMA address if supported by H/W */
-	if (!dma_set_mask(bus->dev, DMA_BIT_MASK(64))) {
-		dma_set_coherent_mask(bus->dev, DMA_BIT_MASK(64));
-	} else {
-		dma_set_mask(bus->dev, DMA_BIT_MASK(32));
-		dma_set_coherent_mask(bus->dev, DMA_BIT_MASK(32));
-	}
+	if (dma_set_mask_and_coherent(bus->dev, DMA_BIT_MASK(64)))
+		dma_set_mask_and_coherent(bus->dev, DMA_BIT_MASK(32));
 
 	/* initialize streams */
 	snd_hdac_ext_stream_init_all