Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6be2a3a0 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Linus Walleij
Browse files

pinctrl: at91: use __maybe_unused to hide pm functions



The at91-pio4 pinctrl driver uses SET_SYSTEM_SLEEP_PM_OPS() to
conditionally set the correct suspend/resume options, but they
become unused when CONFIG_PM is disabled:

drivers/pinctrl/pinctrl-at91-pio4.c:827:12: error: 'atmel_pctrl_suspend' defined but not used [-Werror=unused-function]
drivers/pinctrl/pinctrl-at91-pio4.c:847:12: error: 'atmel_pctrl_resume' defined but not used [-Werror=unused-function]

This adds __maybe_unused annotations so the compiler knows
it can silently drop them instead of warning.

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: default avatarLudovic Desroches <ludovic.desroches@atmel.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 331207af
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -824,7 +824,7 @@ static struct pinctrl_desc atmel_pinctrl_desc = {
	.pmxops		= &atmel_pmxops,
};

static int atmel_pctrl_suspend(struct device *dev)
static int __maybe_unused atmel_pctrl_suspend(struct device *dev)
{
	struct platform_device *pdev = to_platform_device(dev);
	struct atmel_pioctrl *atmel_pioctrl = platform_get_drvdata(pdev);
@@ -844,7 +844,7 @@ static int atmel_pctrl_suspend(struct device *dev)
	return 0;
}

static int atmel_pctrl_resume(struct device *dev)
static int __maybe_unused atmel_pctrl_resume(struct device *dev)
{
	struct platform_device *pdev = to_platform_device(dev);
	struct atmel_pioctrl *atmel_pioctrl = platform_get_drvdata(pdev);