[alsa-devel] [PATCH] ALSA: cs5535audio: fix unused warnings on resume/suspend
Takashi Iwai
tiwai at suse.de
Wed Dec 28 16:05:26 CET 2016
On Sat, 17 Dec 2016 01:25:27 +0100,
Jérémy Lefaure wrote:
>
> 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: Jérémy Lefaure <jeremy.lefaure at lse.epita.fr>
Applied, thanks.
Takashi
> ---
> sound/pci/cs5535audio/cs5535audio_pm.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/sound/pci/cs5535audio/cs5535audio_pm.c b/sound/pci/cs5535audio/cs5535audio_pm.c
> index 06ac5d8da362..82bd10b68a77 100644
> --- a/sound/pci/cs5535audio/cs5535audio_pm.c
> +++ b/sound/pci/cs5535audio/cs5535audio_pm.c
> @@ -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;
> --
> 2.11.0
>
>
More information about the Alsa-devel
mailing list