summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-pcm.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-03-05 13:17:47 +0100
committerMark Brown <broonie@linaro.org>2014-03-06 17:04:55 +0800
commitcdde4ccb14b4959bd1c96a07367bf02b746328d3 (patch)
treed810edb5e51f268dfb1005a8e74ba90cc3dd9f69 /sound/soc/soc-pcm.c
parent6106d12947d1b05dc15ca3933eb514347d6ed726 (diff)
downloadlinux-cdde4ccb14b4959bd1c96a07367bf02b746328d3.tar.bz2
ASoC: Move active count from CODEC to component
There is no reason why active count tracking should only be done for CODECs but not for other components. Moving the active count from the snd_soc_codec struct to the snd_soc_component struct reduces the differences between CODECs and other components and will eventually allow component to component DAI links (Which is a prerequisite for converting CODECs to components). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/soc-pcm.c')
-rw-r--r--sound/soc/soc-pcm.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 71a01dda1867..98b46295785d 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -61,9 +61,8 @@ void snd_soc_runtime_activate(struct snd_soc_pcm_runtime *rtd, int stream)
cpu_dai->active++;
codec_dai->active++;
- if (cpu_dai->codec)
- cpu_dai->codec->active++;
- codec_dai->codec->active++;
+ cpu_dai->component->active++;
+ codec_dai->component->active++;
}
/**
@@ -93,9 +92,8 @@ void snd_soc_runtime_deactivate(struct snd_soc_pcm_runtime *rtd, int stream)
cpu_dai->active--;
codec_dai->active--;
- if (cpu_dai->codec)
- cpu_dai->codec->active--;
- codec_dai->codec->active--;
+ cpu_dai->component->active--;
+ codec_dai->component->active--;
}
/**