diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2018-01-24 00:18:46 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-01-24 05:30:20 -0500 |
commit | f30a4c313eb6d5027a85869d1ccf626208218ed0 (patch) | |
tree | f3b1b36a660abe5da129fd1a115224e914692a1a | |
parent | 4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323 (diff) |
ASoC: soc-pcm: don't call flush_delayed_work() many times in soc_pcm_private_free()
commit f523acebbb74 ("ASoC: add Component level pcm_new/pcm_free v2")
added component level pcm_new/pcm_free, but flush_delayed_work()
on soc_pcm_private_free() is called in for_each_rtdcom() loop.
It doesn't need to be called many times.
This patch moves it out of loop.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/soc-pcm.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 8075856668c2..998800cc44ef 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c | |||
@@ -2831,10 +2831,9 @@ static void soc_pcm_private_free(struct snd_pcm *pcm) | |||
2831 | struct snd_soc_rtdcom_list *rtdcom; | 2831 | struct snd_soc_rtdcom_list *rtdcom; |
2832 | struct snd_soc_component *component; | 2832 | struct snd_soc_component *component; |
2833 | 2833 | ||
2834 | /* need to sync the delayed work before releasing resources */ | ||
2835 | flush_delayed_work(&rtd->delayed_work); | ||
2834 | for_each_rtdcom(rtd, rtdcom) { | 2836 | for_each_rtdcom(rtd, rtdcom) { |
2835 | /* need to sync the delayed work before releasing resources */ | ||
2836 | |||
2837 | flush_delayed_work(&rtd->delayed_work); | ||
2838 | component = rtdcom->component; | 2837 | component = rtdcom->component; |
2839 | 2838 | ||
2840 | if (component->pcm_free) | 2839 | if (component->pcm_free) |