提交 2e492462 编写于 作者: M Maxim Levitsky 提交者: Jaroslav Kysela

[ALSA] hda-intel - fix a race in dynamic power managment

codec->power_transition is supposed to be true while codec is going
to be shut off if in the mean time somebody calls snd_hda_power_up,
hda_power_work will not shut down the codec, but nether will clear
codec->power_transition, thus it stays on forever. Fix this.
Signed-off-by: NMaxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
Signed-off-by: NJaroslav Kysela <perex@suse.cz>
上级 b7e054a7
......@@ -2195,8 +2195,10 @@ static void hda_power_work(struct work_struct *work)
struct hda_codec *codec =
container_of(work, struct hda_codec, power_work.work);
if (!codec->power_on || codec->power_count)
if (!codec->power_on || codec->power_count) {
codec->power_transition = 0;
return;
}
hda_call_codec_suspend(codec);
if (codec->bus->ops.pm_notify)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册