• Jérémy Lefaure's avatar
    ALSA: cs5535audio: fix unused warnings on resume/suspend · fe4cb86c
    Jérémy Lefaure authored
    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: default avatarJérémy Lefaure <jeremy.lefaure@lse.epita.fr>
    Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    fe4cb86c
cs5535audio_pm.c 3.46 KB