diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-10-23 19:20:24 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-11-12 22:05:32 -0500 |
commit | c9e32ffdbe042276914daac9cdc737b8896eace6 (patch) | |
tree | b2ec70f08c1cc5c51ab4cc586f60ad2ae4842b27 /sound/pci | |
parent | 8fde18bd74c8f30094bc47edf2c9ed19478661de (diff) |
ALSA: hda - Fix unbalanced runtime PM refcount after S3/S4
commit e6bbe666673ab044a3d39ddb74e4d9a401cf1d6f upstream.
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.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 55108b5fb291..31461ba32d3c 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -4789,8 +4789,8 @@ static void hda_power_work(struct work_struct *work) | |||
4789 | spin_unlock(&codec->power_lock); | 4789 | spin_unlock(&codec->power_lock); |
4790 | 4790 | ||
4791 | state = hda_call_codec_suspend(codec, true); | 4791 | state = hda_call_codec_suspend(codec, true); |
4792 | codec->pm_down_notified = 0; | 4792 | if (!codec->pm_down_notified && |
4793 | if (!bus->power_keep_link_on && (state & AC_PWRST_CLK_STOP_OK)) { | 4793 | !bus->power_keep_link_on && (state & AC_PWRST_CLK_STOP_OK)) { |
4794 | codec->pm_down_notified = 1; | 4794 | codec->pm_down_notified = 1; |
4795 | hda_call_pm_notify(bus, false); | 4795 | hda_call_pm_notify(bus, false); |
4796 | } | 4796 | } |