hda - bug fix on references without checking CONFIG_SND_HDA_POWER_SAVE
PATCH 1/1 hda - bug fix on references without checking CONFIG_SND_HDA_POWER_SAVE
From: Mengdong Lin <[email protected]>
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.
--- sound/pci/hda/hda_intel.c | 2 ++ 1 file changed, 2 insertions(+)
sound/pci/hda/hda_intel.c +2 -0
@@ -2515,8 +2515,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);
Signature · 1 line
1.7.9.5
Sorry, please ignore this patch. The bug fix is not enough.
Thanks
Mengdong
Quoted 41 lines
-----Original Message-----
From: Lin, Mengdong
Sent: Friday, August 24, 2012 10:48 AM
To: [email protected]
Cc: [email protected]; Wu, Fengguang; Lin, Mengdong
Subject: [PATCH] [ALSA] hda - bug fix on references without checkingCONFIG_SND_HDA_POWER_SAVEFrom: Mengdong Lin <[email protected]>
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 macroCONFIG_SND_HDA_POWER_SAVE.This patch is to fix the bug.
Signed-off-by Mengdong Lin <[email protected]>--- sound/pci/hda/hda_intel.c | 2 ++ 1 file changed, 2 insertions(+)sound/pci/hda/hda_intel.c index renamed from sound/pci/hda/hda_intel.c +0
-02baa3ee..97307df 100644
sound/pci/hda/hda_intel.c +2
-0@@ -2515,8 +2515,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);
--
1.7.9.5