diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2020-05-15 09:47:01 +0900 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-05-18 16:15:05 +0100 |
commit | 8ca4602d38c5140ae2cbeec9f1dd7803b0c4d61d (patch) | |
tree | 655773932f3335a9ae3fc776f98aa5a2b316225a /sound/soc/bcm/bcm2835-i2s.c | |
parent | e1c7e1faa404df564e64785c0b5cb7f1ee2d785d (diff) |
ASoC: bcm: use snd_soc_xxx_active()
We have snd_soc_dai/dai_stream/component_active() macro
This patch uses it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87zhaa58je.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/bcm/bcm2835-i2s.c')
-rw-r--r-- | sound/soc/bcm/bcm2835-i2s.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c index e6a12e271b07..d80b570e950e 100644 --- a/sound/soc/bcm/bcm2835-i2s.c +++ b/sound/soc/bcm/bcm2835-i2s.c @@ -653,7 +653,7 @@ static void bcm2835_i2s_stop(struct bcm2835_i2s_dev *dev, BCM2835_I2S_CS_A_REG, mask, 0); /* Stop also the clock when not SND_SOC_DAIFMT_CONT */ - if (!dai->active && !(dev->fmt & SND_SOC_DAIFMT_CONT)) + if (!snd_soc_dai_active(dai) && !(dev->fmt & SND_SOC_DAIFMT_CONT)) bcm2835_i2s_stop_clock(dev); } @@ -695,7 +695,7 @@ static int bcm2835_i2s_startup(struct snd_pcm_substream *substream, { struct bcm2835_i2s_dev *dev = snd_soc_dai_get_drvdata(dai); - if (dai->active) + if (snd_soc_dai_active(dai)) return 0; /* Should this still be running stop it */ @@ -723,7 +723,7 @@ static void bcm2835_i2s_shutdown(struct snd_pcm_substream *substream, bcm2835_i2s_stop(dev, substream, dai); /* If both streams are stopped, disable module and clock */ - if (dai->active) + if (snd_soc_dai_active(dai)) return; /* Disable the module */ |