diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-10-23 19:20:24 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-10-24 03:21:45 -0400 |
commit | e6bbe666673ab044a3d39ddb74e4d9a401cf1d6f (patch) | |
tree | e1c681dfe1d213c2d8833dcf7290832d654faebf /sound/pci | |
parent | d7f8761b6614d2d3695dd57d27d0b2f952777648 (diff) |
ALSA: hda - Fix unbalanced runtime PM refcount after S3/S4
When a machine goes to S3/S4 after power-save is enabled, the runtime
PM refcount might be incorrectly decreased because the power-down
triggered soon after resume assumes that the controller was already
powered up, and issues the pm_notify down.
This patch fixes the incorrect pm_notify call simply by checking the
current value properly.
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 5b6c4e3c92ca..748c6a941963 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -4864,8 +4864,8 @@ static void hda_power_work(struct work_struct *work) | |||
4864 | spin_unlock(&codec->power_lock); | 4864 | spin_unlock(&codec->power_lock); |
4865 | 4865 | ||
4866 | state = hda_call_codec_suspend(codec, true); | 4866 | state = hda_call_codec_suspend(codec, true); |
4867 | codec->pm_down_notified = 0; | 4867 | if (!codec->pm_down_notified && |
4868 | if (!bus->power_keep_link_on && (state & AC_PWRST_CLK_STOP_OK)) { | 4868 | !bus->power_keep_link_on && (state & AC_PWRST_CLK_STOP_OK)) { |
4869 | codec->pm_down_notified = 1; | 4869 | codec->pm_down_notified = 1; |
4870 | hda_call_pm_notify(bus, false); | 4870 | hda_call_pm_notify(bus, false); |
4871 | } | 4871 | } |