Skip to content

Commit b888edb

Browse files
wangbiaobroonie
authored andcommitted
ASoC: wm8994: Move DCS done IRQ request later
once code return from request_threaded_irq, irq was setup enabled by default, but completion var dcs_done not got initialized yet, if then a dcs done irq was raised, system will got hung as the sync mechanism is invalid now. so this patch move dcs done irq request to the end of initialization of completion. Signed-off-by: wang, biao <biao.wang@intel.com> Signed-off-by: Zhang, Di <di.zhang@intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
1 parent 6ce4eac commit b888edb

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

‎sound/soc/codecs/wm8994.c‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4077,12 +4077,6 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec)
40774077
wm8994_request_irq(wm8994->wm8994, WM8994_IRQ_TEMP_SHUT,
40784078
wm8994_temp_shut, "Thermal shutdown", codec);
40794079

4080-
ret = wm8994_request_irq(wm8994->wm8994, WM8994_IRQ_DCS_DONE,
4081-
wm_hubs_dcs_done, "DC servo done",
4082-
&wm8994->hubs);
4083-
if (ret == 0)
4084-
wm8994->hubs.dcs_done_irq = true;
4085-
40864080
switch (control->type) {
40874081
case WM8994:
40884082
if (wm8994->micdet_irq) {
@@ -4313,6 +4307,11 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec)
43134307
}
43144308

43154309
wm_hubs_add_analogue_routes(codec, 0, 0);
4310+
ret = wm8994_request_irq(wm8994->wm8994, WM8994_IRQ_DCS_DONE,
4311+
wm_hubs_dcs_done, "DC servo done",
4312+
&wm8994->hubs);
4313+
if (ret == 0)
4314+
wm8994->hubs.dcs_done_irq = true;
43164315
snd_soc_dapm_add_routes(dapm, intercon, ARRAY_SIZE(intercon));
43174316

43184317
switch (control->type) {

0 commit comments

Comments
 (0)