diff options
author | Curtis Malainey <cujomalainey@chromium.org> | 2019-12-03 18:30:07 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-12-04 12:15:30 +0100 |
commit | 4bf2e385aa59c2fae5f880aa25cfd2b470109093 (patch) | |
tree | e45468415a1ab214b52cb095d0bbf13f327178d6 /sound/soc/soc-compress.c | |
parent | ASoC: Intel: sst: Add missing include <linux/io.h> (diff) | |
download | linux-4bf2e385aa59c2fae5f880aa25cfd2b470109093.tar.xz linux-4bf2e385aa59c2fae5f880aa25cfd2b470109093.zip |
ASoC: core: Init pcm runtime work early to avoid warnings
There are cases where we fail before we reach soc_new_pcm which would
init the workqueue. When we fail we attempt to flush the queue which
generates warnings from the workqueue subsystem when we have not inited
the queue. Solution is to use a proxy function to get around this issue.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20191203173007.46504-1-cujomalainey@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-compress.c')
-rw-r--r-- | sound/soc/soc-compress.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c index 61f230324164..6615ef64c7f5 100644 --- a/sound/soc/soc-compress.c +++ b/sound/soc/soc-compress.c @@ -214,10 +214,8 @@ be_err: * This is to ensure there are no pops or clicks in between any music tracks * due to DAPM power cycling. */ -static void close_delayed_work(struct work_struct *work) +static void close_delayed_work(struct snd_soc_pcm_runtime *rtd) { - struct snd_soc_pcm_runtime *rtd = - container_of(work, struct snd_soc_pcm_runtime, delayed_work.work); struct snd_soc_dai *codec_dai = rtd->codec_dai; mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass); @@ -929,7 +927,7 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num) } /* DAPM dai link stream work */ - INIT_DELAYED_WORK(&rtd->delayed_work, close_delayed_work); + rtd->close_delayed_work_func = close_delayed_work; rtd->compr = compr; compr->private_data = rtd; |