summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-08-14 18:10:09 +0200
committerTakashi Iwai <tiwai@suse.de>2012-08-14 18:11:51 +0200
commit7ccbde57ce312ff1388c2990699f8863280808ac (patch)
tree477c035659ce549d928bd468c7c54747a82ea743 /sound
parent6152597971db4055b7b03ccc60afcd62214d41f4 (diff)
downloadop-kernel-dev-7ccbde57ce312ff1388c2990699f8863280808ac.zip
op-kernel-dev-7ccbde57ce312ff1388c2990699f8863280808ac.tar.gz
ALSA: hda - Fix possible compile warnings regarding CONFIG_PM
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>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/hda_intel.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 23ad7e2..464ea16b 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -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 */
/*
OpenPOWER on IntegriCloud