aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Wunner <lukas@wunner.de>2018-03-29 15:35:54 -0400
committerLukas Wunner <lukas@wunner.de>2018-03-29 15:47:53 -0400
commit8cd1b5bd70cccda6854088825e725a513ec919c6 (patch)
treef1589c09ba1db5fe2bd0d1cca997e474fc67643f
parenta01c47737a9ca118ab75c6fd6e75739b824de830 (diff)
ALSA: hda - Silence PM ops build warning
The system sleep PM ops azx_suspend() and azx_resume() were previously called by vga_switcheroo, but commit 07f4f97d7b4b ("vga_switcheroo: Use device link for HDA controller") removed their invocation. Unfortunately the commit neglected to update the #ifdef surrounding the two functions, so if CONFIG_PM_SLEEP is *not* enabled but all three of CONFIG_PM, CONFIG_VGA_SWITCHEROO and CONFIG_SND_HDA_CODEC_HDMI *are* enabled, the compiler now emits the following warning: sound/pci/hda/hda_intel.c:1024:12: warning: 'azx_resume' defined but not used [-Wunused-function] static int azx_resume(struct device *dev) ^~~~~~~~~~ sound/pci/hda/hda_intel.c:989:12: warning: 'azx_suspend' defined but not used [-Wunused-function] static int azx_suspend(struct device *dev) ^~~~~~~~~~~ Silence by updating the #ifdef. Because the #ifdef block now uses the same condition as the one immediately succeeding it, the two blocks can be collapsed together, shaving off another two lines. Fixes: 07f4f97d7b4b ("vga_switcheroo: Use device link for HDA controller") Reviewed-by: Takashi Iwai <tiwai@suse.de> Reported-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Lukas Wunner <lukas@wunner.de> Link: https://patchwork.kernel.org/patch/10313441/ Link: https://patchwork.freedesktop.org/patch/msgid/b8e70e34a9acbd4f0a1a6c7673cea96888ae9503.1522323444.git.lukas@wunner.de
-rw-r--r--sound/pci/hda/hda_intel.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index ec4e6b829ee2..d653c56e9141 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -982,7 +982,7 @@ static int param_set_xint(const char *val, const struct kernel_param *kp)
982#define azx_del_card_list(chip) /* NOP */ 982#define azx_del_card_list(chip) /* NOP */
983#endif /* CONFIG_PM */ 983#endif /* CONFIG_PM */
984 984
985#if defined(CONFIG_PM_SLEEP) || defined(SUPPORT_VGA_SWITCHEROO) 985#ifdef CONFIG_PM_SLEEP
986/* 986/*
987 * power management 987 * power management
988 */ 988 */
@@ -1063,9 +1063,7 @@ static int azx_resume(struct device *dev)
1063 trace_azx_resume(chip); 1063 trace_azx_resume(chip);
1064 return 0; 1064 return 0;
1065} 1065}
1066#endif /* CONFIG_PM_SLEEP || SUPPORT_VGA_SWITCHEROO */
1067 1066
1068#ifdef CONFIG_PM_SLEEP
1069/* put codec down to D3 at hibernation for Intel SKL+; 1067/* put codec down to D3 at hibernation for Intel SKL+;
1070 * otherwise BIOS may still access the codec and screw up the driver 1068 * otherwise BIOS may still access the codec and screw up the driver
1071 */ 1069 */