aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/adav80x.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-03-05 07:17:45 -0500
committerMark Brown <broonie@linaro.org>2014-03-06 04:04:55 -0500
commit5c898e74d135a23ce12e0263c1a3c78eeae1b52b (patch)
tree987d9a6a06174368d141d6caee65ad4c9e6349bf /sound/soc/codecs/adav80x.c
parenta1a0cc0646e38b41bfaac94f2b84422bb1df40e0 (diff)
ASoC: Add helper function to check whether a CODEC is active
Instead of directly checking the 'active' field of the CODEC struct add a new helper function that will return either true or false depending on whether the CODEC is active. This will make the migration to the component level easier. The patch also updates all CODEC drivers that check the active attribute to use the new helper function. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/codecs/adav80x.c')
-rw-r--r--sound/soc/codecs/adav80x.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/codecs/adav80x.c b/sound/soc/codecs/adav80x.c
index f78b27a7c461..d50cf5b29a27 100644
--- a/sound/soc/codecs/adav80x.c
+++ b/sound/soc/codecs/adav80x.c
@@ -722,7 +722,7 @@ static int adav80x_dai_startup(struct snd_pcm_substream *substream,
722 struct snd_soc_codec *codec = dai->codec; 722 struct snd_soc_codec *codec = dai->codec;
723 struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec); 723 struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec);
724 724
725 if (!codec->active || !adav80x->rate) 725 if (!snd_soc_codec_is_active(codec) || !adav80x->rate)
726 return 0; 726 return 0;
727 727
728 return snd_pcm_hw_constraint_minmax(substream->runtime, 728 return snd_pcm_hw_constraint_minmax(substream->runtime,
@@ -735,7 +735,7 @@ static void adav80x_dai_shutdown(struct snd_pcm_substream *substream,
735 struct snd_soc_codec *codec = dai->codec; 735 struct snd_soc_codec *codec = dai->codec;
736 struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec); 736 struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec);
737 737
738 if (!codec->active) 738 if (!snd_soc_codec_is_active(codec))
739 adav80x->rate = 0; 739 adav80x->rate = 0;
740} 740}
741 741