pinctrl: at91: use __maybe_unused to hide pm functions
authorArnd Bergmann <arnd@arndb.de>
Wed, 2 Mar 2016 15:58:53 +0000 (16:58 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 9 Mar 2016 04:08:32 +0000 (11:08 +0700)
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: Arnd Bergmann <arnd@arndb.de>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-at91-pio4.c

index ee69db6ae1c7e9f3171ca42b92741a683dd8f7e8..4429312e848dba2af05ddb3d9da6cb3b2b176248 100644 (file)
@@ -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);
This page took 0.025174 seconds and 5 git commands to generate.