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

Configure Feed

Select the types of activity you want to include in your feed.

serial: 8250_pnp: Switch to DEFINE_SIMPLE_DEV_PM_OPS()

The SIMPLE_DEV_PM_OPS() is deprecated, replace it with the
DEFINE_SIMPLE_DEV_PM_OPS() and use pm_sleep_ptr() for setting
the driver's PM routines.

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20240422083237.207447-1-andy.shevchenko@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Andy Shevchenko and committed by
Greg Kroah-Hartman
6bb34cf7 aa0bb209

+5 -4
+5 -4
drivers/tty/serial/8250/8250_pnp.c
··· 10 10 */ 11 11 #include <linux/module.h> 12 12 #include <linux/pci.h> 13 + #include <linux/pm.h> 13 14 #include <linux/pnp.h> 14 15 #include <linux/string.h> 15 16 #include <linux/kernel.h> ··· 507 506 serial8250_unregister_port(line - 1); 508 507 } 509 508 510 - static int __maybe_unused serial_pnp_suspend(struct device *dev) 509 + static int serial_pnp_suspend(struct device *dev) 511 510 { 512 511 long line = (long)dev_get_drvdata(dev); 513 512 ··· 517 516 return 0; 518 517 } 519 518 520 - static int __maybe_unused serial_pnp_resume(struct device *dev) 519 + static int serial_pnp_resume(struct device *dev) 521 520 { 522 521 long line = (long)dev_get_drvdata(dev); 523 522 ··· 527 526 return 0; 528 527 } 529 528 530 - static SIMPLE_DEV_PM_OPS(serial_pnp_pm_ops, serial_pnp_suspend, serial_pnp_resume); 529 + static DEFINE_SIMPLE_DEV_PM_OPS(serial_pnp_pm_ops, serial_pnp_suspend, serial_pnp_resume); 531 530 532 531 static struct pnp_driver serial_pnp_driver = { 533 532 .name = "serial", 534 533 .probe = serial_pnp_probe, 535 534 .remove = serial_pnp_remove, 536 535 .driver = { 537 - .pm = &serial_pnp_pm_ops, 536 + .pm = pm_sleep_ptr(&serial_pnp_pm_ops), 538 537 }, 539 538 .id_table = pnp_dev_table, 540 539 };