mirror of https://github.com/torvalds/linux.git
gpio: uniphier: Use modern PM macros
Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use __maybe_unused Signed-off-by: Jisheng Zhang <jszhang@kernel.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Link: https://lore.kernel.org/r/20251124002105.25429-12-jszhang@kernel.org Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
This commit is contained in:
parent
75ff16234b
commit
46e90d3924
|
|
@ -426,7 +426,7 @@ static void uniphier_gpio_remove(struct platform_device *pdev)
|
|||
irq_domain_remove(priv->domain);
|
||||
}
|
||||
|
||||
static int __maybe_unused uniphier_gpio_suspend(struct device *dev)
|
||||
static int uniphier_gpio_suspend(struct device *dev)
|
||||
{
|
||||
struct uniphier_gpio_priv *priv = dev_get_drvdata(dev);
|
||||
unsigned int nbanks = uniphier_gpio_get_nbanks(priv->chip.ngpio);
|
||||
|
|
@ -448,7 +448,7 @@ static int __maybe_unused uniphier_gpio_suspend(struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int __maybe_unused uniphier_gpio_resume(struct device *dev)
|
||||
static int uniphier_gpio_resume(struct device *dev)
|
||||
{
|
||||
struct uniphier_gpio_priv *priv = dev_get_drvdata(dev);
|
||||
unsigned int nbanks = uniphier_gpio_get_nbanks(priv->chip.ngpio);
|
||||
|
|
@ -473,8 +473,7 @@ static int __maybe_unused uniphier_gpio_resume(struct device *dev)
|
|||
}
|
||||
|
||||
static const struct dev_pm_ops uniphier_gpio_pm_ops = {
|
||||
SET_LATE_SYSTEM_SLEEP_PM_OPS(uniphier_gpio_suspend,
|
||||
uniphier_gpio_resume)
|
||||
LATE_SYSTEM_SLEEP_PM_OPS(uniphier_gpio_suspend, uniphier_gpio_resume)
|
||||
};
|
||||
|
||||
static const struct of_device_id uniphier_gpio_match[] = {
|
||||
|
|
@ -489,7 +488,7 @@ static struct platform_driver uniphier_gpio_driver = {
|
|||
.driver = {
|
||||
.name = "uniphier-gpio",
|
||||
.of_match_table = uniphier_gpio_match,
|
||||
.pm = &uniphier_gpio_pm_ops,
|
||||
.pm = pm_sleep_ptr(&uniphier_gpio_pm_ops),
|
||||
},
|
||||
};
|
||||
module_platform_driver(uniphier_gpio_driver);
|
||||
|
|
|
|||
Loading…
Reference in New Issue