]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
pinctrl: msm: mark PM functions as __maybe_unused
authorArnd Bergmann <arnd@arndb.de>
Mon, 10 Dec 2018 20:59:45 +0000 (21:59 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 21 Dec 2018 10:06:41 +0000 (11:06 +0100)
commitd1040ea06f0004fe22e881a8fe88db12ef83b98c
tree7688f8463c07ad7d4816bcf05559946cf3113277
parentb766470b876409b9d821c5773a08a90f8cc50c76
pinctrl: msm: mark PM functions as __maybe_unused

Without CONFIG_PM_SLEEP, we get annoying warnings about unused functions:

drivers/pinctrl/qcom/pinctrl-msm.c:1082:12: error: 'msm_pinctrl_resume' defined but not used [-Werror=unused-function]
 static int msm_pinctrl_resume(struct device *dev)
            ^~~~~~~~~~~~~~~~~~
drivers/pinctrl/qcom/pinctrl-msm.c:1075:12: error: 'msm_pinctrl_suspend' defined but not used [-Werror=unused-function]
 static int msm_pinctrl_suspend(struct device *dev)

Mark them as __maybe_unused to shut up the warning and silently drop
the functions without having to add ugly #ifdefs.

Fixes: 977d057ad346 ("pinctrl: msm: Add sleep pinctrl state transitions")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Evan Green <evgreen@chromium.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/qcom/pinctrl-msm.c