Skip to contentSkip to conversation

hda_intel: fix build error when !PM

PATCH Applied Alexander Beregalov 2 participants 2 messages Jun 4, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hda_intel: fix build error when !PM

Fix this build error when CONFIG_PM is not set:
ound/pci/hda/hda_intel.c: In function 'azx_bus_reset':
sound/pci/hda/hda_intel.c:1270: error: implicit declaration of function 'snd_pcm_suspend_all' sound/pci/hda/hda_intel.c:1271: error: implicit declaration of function 'snd_hda_suspend' sound/pci/hda/hda_intel.c:1272: error: implicit declaration of function 'snd_hda_resume'

---
 sound/pci/hda/hda_intel.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
sound/pci/hda/hda_intel.c +4 -1
index 9f44645..4e9ea70 100644
@@ -1260,17 +1260,20 @@ static void azx_stop_chip(struct azx *chip);
 static void azx_bus_reset(struct hda_bus *bus)
 {
 	struct azx *chip = bus->private_data;
-	int i;
 
 	bus->in_reset = 1;
 	azx_stop_chip(chip);
 	azx_init_chip(chip);
+#ifdef CONFIG_PM
 	if (chip->initialized) {
+		int i;
+
 		for (i = 0; i < AZX_MAX_PCMS; i++)
 			snd_pcm_suspend_all(chip->pcm[i]);
 		snd_hda_suspend(chip->bus);
 		snd_hda_resume(chip->bus);
 	}
+#endif
 	bus->in_reset = 0;
 }
 
Signature · 1 line
1.6.3.1
Applied
#1 lore raw

At Thu, 4 Jun 2009 13:46:16 +0400,

Quoted 8 lines · Alexander Beregalov

Fix this build error when CONFIG_PM is not set:
ound/pci/hda/hda_intel.c: In function 'azx_bus_reset':
sound/pci/hda/hda_intel.c:1270: error: implicit declaration of function 'snd_pcm_suspend_all' sound/pci/hda/hda_intel.c:1271: error: implicit declaration of function 'snd_hda_suspend' sound/pci/hda/hda_intel.c:1272: error: implicit declaration of function 'snd_hda_resume'

Thanks! Applied now.

Takashi