[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170207133918.1085873-1-arnd@arndb.de>
Date: Tue, 7 Feb 2017 14:38:51 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>
Cc: Arnd Bergmann <arnd@...db.de>,
Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>,
Jerome Anand <jerome.anand@...el.com>,
alsa-devel@...a-project.org, linux-kernel@...r.kernel.org
Subject: [PATCH] ALSA: x86: mark hdmi suspend/resume functions as __maybe_unused
The two functions are unused when CONFIG_PM_SLEEP is disabled:
sound/x86/intel_hdmi_audio.c:1633:12: error: 'hdmi_lpe_audio_resume' defined but not used [-Werror=unused-function]
sound/x86/intel_hdmi_audio.c:1622:12: error: 'hdmi_lpe_audio_suspend' defined but not used [-Werror=unused-function]
Marking them as __maybe_unused avoids the warning without introducing an
ugly #ifdef.
Fixes: 182cdf23dbf6 ("ALSA: x86: Implement runtime PM")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
sound/x86/intel_hdmi_audio.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/x86/intel_hdmi_audio.c b/sound/x86/intel_hdmi_audio.c
index 8978dc9bf579..0d19a4994bac 100644
--- a/sound/x86/intel_hdmi_audio.c
+++ b/sound/x86/intel_hdmi_audio.c
@@ -1619,7 +1619,7 @@ static int hdmi_lpe_audio_runtime_suspend(struct device *dev)
return 0;
}
-static int hdmi_lpe_audio_suspend(struct device *dev)
+static int __maybe_unused hdmi_lpe_audio_suspend(struct device *dev)
{
struct snd_intelhad *ctx = dev_get_drvdata(dev);
int err;
@@ -1630,7 +1630,7 @@ static int hdmi_lpe_audio_suspend(struct device *dev)
return err;
}
-static int hdmi_lpe_audio_resume(struct device *dev)
+static int __maybe_unused hdmi_lpe_audio_resume(struct device *dev)
{
struct snd_intelhad *ctx = dev_get_drvdata(dev);
--
2.9.0
Powered by blists - more mailing lists