ALSA: hda - Fix possible compile warnings regarding CONFIG_PM
authorTakashi Iwai <tiwai@suse.de>
Tue, 14 Aug 2012 16:10:09 +0000 (18:10 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 14 Aug 2012 16:11:51 +0000 (18:11 +0200)
Replace with a proper ifdef check of CONFIG_PM_SLEEP in hda_intel.c.
But other places in HD-audio driver are still marked with CONFIG_PM,
since these can be called for power-saving even without
CONFIG_PM_SLEEP.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_intel.c

index 23ad7e216a6be315dcd935156ac41a5d09565e11..464ea16bdd9ed17992bff67faeb44e752fc14b91 100644 (file)
@@ -2409,11 +2409,10 @@ static void azx_power_notify(struct hda_bus *bus)
 }
 #endif /* CONFIG_SND_HDA_POWER_SAVE */
 
-#ifdef CONFIG_PM
+#if defined(CONFIG_PM_SLEEP) || defined(SUPPORT_VGA_SWITCHEROO)
 /*
  * power management
  */
-
 static int azx_suspend(struct device *dev)
 {
        struct pci_dev *pci = to_pci_dev(dev);
@@ -2471,10 +2470,8 @@ static int azx_resume(struct device *dev)
 static SIMPLE_DEV_PM_OPS(azx_pm, azx_suspend, azx_resume);
 #define AZX_PM_OPS     &azx_pm
 #else
-#define azx_suspend(dev)
-#define azx_resume(dev)
 #define AZX_PM_OPS     NULL
-#endif /* CONFIG_PM */
+#endif /* CONFIG_PM_SLEEP || SUPPORT_VGA_SWITCHEROO */
 
 
 /*