From 350eba43fca735733a51185f26bdc30899c64a20 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Fri, 16 Mar 2012 16:09:03 +0100
Subject: [PATCH] ALSA: hda - Fix build with CONFIG_PM=n
Git-commit: 350eba43fca735733a51185f26bdc30899c64a20
Patch-mainline: 3.4-rc3
References: FATE#313695

Signed-off-by: Takashi Iwai <tiwai@suse.de>

---
 sound/pci/hda/patch_sigmatel.c |    9 +++++++++
 1 file changed, 9 insertions(+)

--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -5042,6 +5042,11 @@ static void stac92xx_set_power_state(str
 			afg_power_state);
 	snd_hda_codec_set_power_to_all(codec, fg, power_state, true);
 }
+#else
+#define stac92xx_suspend	NULL
+#define stac92xx_resume		NULL
+#define stac92xx_pre_resume	NULL
+#define stac92xx_set_power_state NULL
 #endif /* CONFIG_PM */
 
 /* update mute-LED accoring to the master switch */
@@ -5587,7 +5592,9 @@ again:
 			codec->patch_ops.set_power_state =
 					stac92xx_set_power_state;
 		}
+#ifdef CONFIG_PM
 		codec->patch_ops.pre_resume = stac92xx_pre_resume;
+#endif
 	}
 
 	err = stac92xx_parse_auto_config(codec);
@@ -5894,7 +5901,9 @@ again:
 			codec->patch_ops.set_power_state =
 					stac92xx_set_power_state;
 		}
+#ifdef CONFIG_PM
 		codec->patch_ops.pre_resume = stac92xx_pre_resume;
+#endif
 	}
 
 	spec->multiout.dac_nids = spec->dac_nids;
