summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/tlv320dac33.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-03-05 13:17:45 +0100
committerMark Brown <broonie@linaro.org>2014-03-06 17:04:55 +0800
commit5c898e74d135a23ce12e0263c1a3c78eeae1b52b (patch)
tree987d9a6a06174368d141d6caee65ad4c9e6349bf /sound/soc/codecs/tlv320dac33.c
parenta1a0cc0646e38b41bfaac94f2b84422bb1df40e0 (diff)
downloadop-kernel-dev-5c898e74d135a23ce12e0263c1a3c78eeae1b52b.zip
op-kernel-dev-5c898e74d135a23ce12e0263c1a3c78eeae1b52b.tar.gz
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/tlv320dac33.c')
-rw-r--r--sound/soc/codecs/tlv320dac33.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c
index 4f35839..35b2d24 100644
--- a/sound/soc/codecs/tlv320dac33.c
+++ b/sound/soc/codecs/tlv320dac33.c
@@ -461,7 +461,7 @@ static int dac33_set_fifo_mode(struct snd_kcontrol *kcontrol,
if (dac33->fifo_mode == ucontrol->value.integer.value[0])
return 0;
/* Do not allow changes while stream is running*/
- if (codec->active)
+ if (snd_soc_codec_is_active(codec))
return -EPERM;
if (ucontrol->value.integer.value[0] < 0 ||
OpenPOWER on IntegriCloud