Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jisheng Zhang and committed by
Bartosz Golaszewski
75ff1623 0ed358a8

+4 -5
+4 -5
drivers/gpio/gpio-tqmx86.c
··· 279 279 } 280 280 281 281 /* Minimal runtime PM is needed by the IRQ subsystem */ 282 - static int __maybe_unused tqmx86_gpio_runtime_suspend(struct device *dev) 282 + static int tqmx86_gpio_runtime_suspend(struct device *dev) 283 283 { 284 284 return 0; 285 285 } 286 286 287 - static int __maybe_unused tqmx86_gpio_runtime_resume(struct device *dev) 287 + static int tqmx86_gpio_runtime_resume(struct device *dev) 288 288 { 289 289 return 0; 290 290 } 291 291 292 292 static const struct dev_pm_ops tqmx86_gpio_dev_pm_ops = { 293 - SET_RUNTIME_PM_OPS(tqmx86_gpio_runtime_suspend, 294 - tqmx86_gpio_runtime_resume, NULL) 293 + RUNTIME_PM_OPS(tqmx86_gpio_runtime_suspend, tqmx86_gpio_runtime_resume, NULL) 295 294 }; 296 295 297 296 static void tqmx86_init_irq_valid_mask(struct gpio_chip *chip, ··· 424 425 static struct platform_driver tqmx86_gpio_driver = { 425 426 .driver = { 426 427 .name = "tqmx86-gpio", 427 - .pm = &tqmx86_gpio_dev_pm_ops, 428 + .pm = pm_ptr(&tqmx86_gpio_dev_pm_ops), 428 429 }, 429 430 .probe = tqmx86_gpio_probe, 430 431 };