diff options
author | Takashi Iwai <tiwai@suse.de> | 2019-04-13 10:04:49 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-04-13 10:04:49 +0200 |
commit | 183ab39eb0ea9879bb68422a83e65f750f3192f0 (patch) | |
tree | 479df9b9a5cb4503ae669f4ad96b74a52298b595 /sound/pci/hda/hda_codec.c | |
parent | 9b0dcd0e5a27958b57e3e390f63c098d63a055da (diff) | |
download | lwn-183ab39eb0ea9879bb68422a83e65f750f3192f0.tar.gz lwn-183ab39eb0ea9879bb68422a83e65f750f3192f0.zip |
ALSA: hda: Initialize power_state field properly
The recent commit 98081ca62cba ("ALSA: hda - Record the current power
state before suspend/resume calls") made the HD-audio driver to store
the PM state in power_state field. This forgot, however, the
initialization at power up. Although the codec drivers usually don't
need to refer to this field in the normal operation, let's initialize
it properly for consistency.
Fixes: 98081ca62cba ("ALSA: hda - Record the current power state before suspend/resume calls")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index ec0b8595eb4d..701a69d856f5 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -969,6 +969,7 @@ int snd_hda_codec_device_new(struct hda_bus *bus, struct snd_card *card, /* power-up all before initialization */ hda_set_power_state(codec, AC_PWRST_D0); + codec->core.dev.power.power_state = PMSG_ON; snd_hda_codec_proc_new(codec); |