diff options
author | Arnd Bergmann <arnd@arndb.de> | 2023-03-10 15:02:35 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2023-03-13 11:19:39 +0100 |
commit | f7fc5768e57cc18c24783c524f4e80e680dc4fc4 (patch) | |
tree | 6930eeb85d2b5febe6bdadd8ed0f81ccacff7726 /drivers/pinctrl/nxp/pinctrl-s32g2.c | |
parent | pinctrl: sx150x: drop of_match_ptr for ID table (diff) | |
download | linux-f7fc5768e57cc18c24783c524f4e80e680dc4fc4.tar.xz linux-f7fc5768e57cc18c24783c524f4e80e680dc4fc4.zip |
pinctrl: s32cc: fix !CONFIG_PM_SLEEP build error
The declaration of s32_pinctrl_suspend/s32_pinctrl_resume is hidden
in an #ifdef, causing a compilation failure when CONFIG_PM_SLEEP is
disabled:
drivers/pinctrl/nxp/pinctrl-s32g2.c:754:38: error: 's32_pinctrl_suspend' undeclared here (not in a function); did you mean 's32_pinctrl_probe'?
drivers/pinctrl/nxp/pinctrl-s32g2.c:754:9: note: in expansion of macro 'SET_LATE_SYSTEM_SLEEP_PM_OPS'
754 | SET_LATE_SYSTEM_SLEEP_PM_OPS(s32_pinctrl_suspend,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
Remove the bogus #ifdef and __maybe_unused annation on the global
functions, and instead use the proper LATE_SYSTEM_SLEEP_PM_OPS()
macro to pick set the function pointer.
As the function definition is still in the #ifdef block, this leads
to the correct code in all configurations.
Fixes: fd84aaa8173d ("pinctrl: add NXP S32 SoC family support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20230310140250.359147-1-arnd@kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/nxp/pinctrl-s32g2.c')
-rw-r--r-- | drivers/pinctrl/nxp/pinctrl-s32g2.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pinctrl/nxp/pinctrl-s32g2.c b/drivers/pinctrl/nxp/pinctrl-s32g2.c index 7dd0b4f8904d..5028f4adc389 100644 --- a/drivers/pinctrl/nxp/pinctrl-s32g2.c +++ b/drivers/pinctrl/nxp/pinctrl-s32g2.c @@ -751,8 +751,7 @@ static int s32g_pinctrl_probe(struct platform_device *pdev) } static const struct dev_pm_ops s32g_pinctrl_pm_ops = { - SET_LATE_SYSTEM_SLEEP_PM_OPS(s32_pinctrl_suspend, - s32_pinctrl_resume) + LATE_SYSTEM_SLEEP_PM_OPS(s32_pinctrl_suspend, s32_pinctrl_resume) }; static struct platform_driver s32g_pinctrl_driver = { |