gpio: xgene: mark PM functions as __maybe_unused
authorArnd Bergmann <arnd@arndb.de>
Fri, 17 Feb 2017 15:13:44 +0000 (16:13 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Feb 2018 10:05:52 +0000 (11:05 +0100)
commit9f47b68eabcf126cd1caec7fcbbb16e1ecc0f09c
tree4adcf9377e05212a35d62d4318e3f8356e05ea56
parent10170a9abae7fbe34ddf2c0ecf230c30e21afc53
gpio: xgene: mark PM functions as __maybe_unused

commit b115bebc07f282067eccc06fd5aa3060ab1426da upstream.

When CONFIG_PM_SLEEP is disabled, we get a warning about unused functions:

drivers/gpio/gpio-xgene.c:155:12: warning: 'xgene_gpio_resume' defined but not used [-Wunused-function]
 static int xgene_gpio_resume(struct device *dev)
            ^~~~~~~~~~~~~~~~~
drivers/gpio/gpio-xgene.c:142:12: warning: 'xgene_gpio_suspend' defined but not used [-Wunused-function]
 static int xgene_gpio_suspend(struct device *dev)

The warnings are harmless and can be avoided by simplifying the code and marking
the functions as __maybe_unused.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpio/gpio-xgene.c