aboutsummaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_intel.c
diff options
context:
space:
mode:
authorMengdong Lin <mengdong.lin@intel.com>2012-08-24 12:06:30 +0800
committerTakashi Iwai <tiwai@suse.de>2012-08-24 07:22:42 +0200
commit5d6147f10113c240845ea9e8e4e744bbadce5bcb (patch)
tree9b30d7abcbb1f641e2c0525711fc56564b0788ad /sound/pci/hda/hda_intel.c
parentb8dfc4624162c0547d7f36a9df48da2d9b4bd58a (diff)
ALSA: hda - bug fix on references without checking CONFIG_SND_HDA_POWER_SAVE
The patch to support runtime PM introduced a bug: Module parameter 'power_save_controller', and the codec flag 'd3_stop_clk' 'd3_stop_clk_ok' are defined only when HDA power save is enabled in config. But there are references to them without checking macro CONFIG_SND_HDA_POWER_SAVE. This patch is to fix the bug. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_intel.c')
-rw-r--r--sound/pci/hda/hda_intel.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 726f4208bd0..1c9c779dda5 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2528,8 +2528,10 @@ static int azx_runtime_suspend(struct device *dev)
struct snd_card *card = dev_get_drvdata(dev);
struct azx *chip = card->private_data;
+#ifdef CONFIG_SND_HDA_POWER_SAVE
if (!power_save_controller)
return -EAGAIN;
+#endif
azx_stop_chip(chip);
azx_clear_irq_pending(chip);