diff options
Diffstat (limited to 'sound/pci/hda/hda_generic.c')
| -rw-r--r-- | sound/pci/hda/hda_generic.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c index 367dbf0d285e..5c4fa8eba1d0 100644 --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c @@ -843,7 +843,7 @@ static hda_nid_t path_power_update(struct hda_codec *codec, bool allow_powerdown) { hda_nid_t nid, changed = 0; - int i, state, power; + int i, state; for (i = 0; i < path->depth; i++) { nid = path->path[i]; @@ -855,9 +855,7 @@ static hda_nid_t path_power_update(struct hda_codec *codec, state = AC_PWRST_D0; else state = AC_PWRST_D3; - power = snd_hda_codec_read(codec, nid, 0, - AC_VERB_GET_POWER_STATE, 0); - if (power != (state | (state << 4))) { + if (!snd_hda_check_power_state(codec, nid, state)) { snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_POWER_STATE, state); changed = nid; |
