mirror of https://github.com/torvalds/linux.git
gpio: tqmx86: 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> Link: https://lore.kernel.org/r/20251124002105.25429-11-jszhang@kernel.org Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
This commit is contained in:
parent
0ed358a87d
commit
75ff16234b
|
|
@ -279,19 +279,18 @@ static void tqmx86_gpio_irq_handler(struct irq_desc *desc)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Minimal runtime PM is needed by the IRQ subsystem */
|
/* Minimal runtime PM is needed by the IRQ subsystem */
|
||||||
static int __maybe_unused tqmx86_gpio_runtime_suspend(struct device *dev)
|
static int tqmx86_gpio_runtime_suspend(struct device *dev)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __maybe_unused tqmx86_gpio_runtime_resume(struct device *dev)
|
static int tqmx86_gpio_runtime_resume(struct device *dev)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct dev_pm_ops tqmx86_gpio_dev_pm_ops = {
|
static const struct dev_pm_ops tqmx86_gpio_dev_pm_ops = {
|
||||||
SET_RUNTIME_PM_OPS(tqmx86_gpio_runtime_suspend,
|
RUNTIME_PM_OPS(tqmx86_gpio_runtime_suspend, tqmx86_gpio_runtime_resume, NULL)
|
||||||
tqmx86_gpio_runtime_resume, NULL)
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static void tqmx86_init_irq_valid_mask(struct gpio_chip *chip,
|
static void tqmx86_init_irq_valid_mask(struct gpio_chip *chip,
|
||||||
|
|
@ -425,7 +424,7 @@ static int tqmx86_gpio_probe(struct platform_device *pdev)
|
||||||
static struct platform_driver tqmx86_gpio_driver = {
|
static struct platform_driver tqmx86_gpio_driver = {
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "tqmx86-gpio",
|
.name = "tqmx86-gpio",
|
||||||
.pm = &tqmx86_gpio_dev_pm_ops,
|
.pm = pm_ptr(&tqmx86_gpio_dev_pm_ops),
|
||||||
},
|
},
|
||||||
.probe = tqmx86_gpio_probe,
|
.probe = tqmx86_gpio_probe,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue