提交 fe4cb86c 编写于 作者: J Jérémy Lefaure 提交者: Takashi Iwai

ALSA: cs5535audio: fix unused warnings on resume/suspend

When CONFIG_PM_SLEEP is disabled, SIMPLE_DEV_PM_OPS does not use
snd_cs5535audio_resume and snd_cs5535audio_suspend functions:

sound/pci/cs5535audio/cs5535audio_pm.c:77:12: warning: ‘snd_cs5535audio_resume’ defined but not used [-Wunused-function]
 static int snd_cs5535audio_resume(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~~~~
sound/pci/cs5535audio/cs5535audio_pm.c:58:12: warning: ‘snd_cs5535audio_suspend’ defined but not used [-Wunused-function]
 static int snd_cs5535audio_suspend(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~~~~~

Adding __maybe_unused to the declaration of these functions removes the
warnings.
Signed-off-by: NJérémy Lefaure <jeremy.lefaure@lse.epita.fr>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 2d706e79
......@@ -55,7 +55,7 @@ static void snd_cs5535audio_stop_hardware(struct cs5535audio *cs5535au)
}
static int snd_cs5535audio_suspend(struct device *dev)
static int __maybe_unused snd_cs5535audio_suspend(struct device *dev)
{
struct snd_card *card = dev_get_drvdata(dev);
struct cs5535audio *cs5535au = card->private_data;
......@@ -74,7 +74,7 @@ static int snd_cs5535audio_suspend(struct device *dev)
return 0;
}
static int snd_cs5535audio_resume(struct device *dev)
static int __maybe_unused snd_cs5535audio_resume(struct device *dev)
{
struct snd_card *card = dev_get_drvdata(dev);
struct cs5535audio *cs5535au = card->private_data;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册