diff options
author | Arnd Bergmann <arnd@arndb.de> | 2018-12-10 21:59:45 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2018-12-21 11:06:41 +0100 |
commit | d1040ea06f0004fe22e881a8fe88db12ef83b98c (patch) | |
tree | 7688f8463c07ad7d4816bcf05559946cf3113277 /drivers | |
parent | dt-bindings: pinctrl: sunxi: Add supply properties (diff) | |
download | linux-d1040ea06f0004fe22e881a8fe88db12ef83b98c.tar.xz linux-d1040ea06f0004fe22e881a8fe88db12ef83b98c.zip |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pinctrl/qcom/pinctrl-msm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c index 87cbebe217fd..ee8119879c4c 100644 --- a/drivers/pinctrl/qcom/pinctrl-msm.c +++ b/drivers/pinctrl/qcom/pinctrl-msm.c @@ -1072,14 +1072,14 @@ static void msm_pinctrl_setup_pm_reset(struct msm_pinctrl *pctrl) } } -static int msm_pinctrl_suspend(struct device *dev) +static __maybe_unused int msm_pinctrl_suspend(struct device *dev) { struct msm_pinctrl *pctrl = dev_get_drvdata(dev); return pinctrl_force_sleep(pctrl->pctrl); } -static int msm_pinctrl_resume(struct device *dev) +static __maybe_unused int msm_pinctrl_resume(struct device *dev) { struct msm_pinctrl *pctrl = dev_get_drvdata(dev); |