From: Takashi Iwai Date: Tue, 18 Jun 2013 05:55:02 +0000 (+0200) Subject: ALSA: hda - Fix return value of snd_hda_check_power_state() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=06ec56d3c60238f27bfa50d245592fccc1b4ef0f;p=openwrt%2Fstaging%2Fblogic.git ALSA: hda - Fix return value of snd_hda_check_power_state() The refactoring by commit 9040d102 introduced the new function snd_hda_check_power_state(). This function is supposed to return true if the state already reached to the target state, but it actually returns false for that. An utterly stupid typo while copy & paste. Fortunately this didn't influence on much behavior because powering up AFG usually powers up the child widgets, too. But the finer power control must have been broken by this bug. Cc: [v3.9+] Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h index e0bf7534fa1f..29ed7d9b27e4 100644 --- a/sound/pci/hda/hda_local.h +++ b/sound/pci/hda/hda_local.h @@ -667,7 +667,7 @@ snd_hda_check_power_state(struct hda_codec *codec, hda_nid_t nid, if (state & AC_PWRST_ERROR) return true; state = (state >> 4) & 0x0f; - return (state != target_state); + return (state == target_state); } unsigned int snd_hda_codec_eapd_power_filter(struct hda_codec *codec,