OSDN Git Service

gpio: xgene: mark PM functions as __maybe_unused
authorArnd Bergmann <arnd@arndb.de>
Fri, 17 Feb 2017 15:13:44 +0000 (16:13 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 6 Mar 2017 13:35:22 +0000 (14:35 +0100)
commitb115bebc07f282067eccc06fd5aa3060ab1426da
treedd1dcda1c95909a8035992b560dda8592c7a80fe
parentfa6256db033067b57318decdc1c583512a1f8f68
gpio: xgene: mark PM functions as __maybe_unused

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>
drivers/gpio/gpio-xgene.c