]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitb93ee821936b4daa2cba690ffa83c4c8dd004999
treedd1dcda1c95909a8035992b560dda8592c7a80fe
parentc5a41056f5ce617fbf0c621aa3963deb10b118d9
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