Skip to contentSkip to conversation

serial: 8250_bcm2835aux: Switch to DEFINE_SIMPLE_DEV_PM_OPS()

PATCH Superseded Andy Shevchenko 2 participants 3 messages Aug 12, 2024 – Aug 13, 2024

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 serial: 8250_bcm2835aux: Switch to DEFINE_SIMPLE_DEV_PM_OPS()

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

---
 drivers/tty/serial/8250/8250_bcm2835aux.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/tty/serial/8250/8250_bcm2835aux.c +1 -3
index 36e2bb34d82b..829abef2564d 100644
@@ -245,9 +245,7 @@ static int bcm2835aux_resume(struct device *dev)
 	return 0;
 }
 
-static const struct dev_pm_ops bcm2835aux_dev_pm_ops = {
-	SYSTEM_SLEEP_PM_OPS(bcm2835aux_suspend, bcm2835aux_resume)
-};
+static DEFINE_SIMPLE_DEV_PM_OPS(bcm2835aux_dev_pm_ops, bcm2835aux_suspend, bcm2835aux_resume);
 
 static struct platform_driver bcm2835aux_serial_driver = {
 	.driver = {
Signature · 1 line
2.43.0.rc1.1336.g36b5255a03ac
#1 lore raw

Hi Andy,

Am 12.08.24 um 16:35 schrieb Andy Shevchenko:

Quoted 2 lines

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

it's possible the implementation doesn't use the optimal macros here. But this sentence is a little bit confusing to me, because the code doesn't use SIMPLE_DEV_PM_OPS().

Best regards

Quoted 21 lines
---
  drivers/tty/serial/8250/8250_bcm2835aux.c | 4 +---
  1 file changed, 1 insertion(+), 3 deletions(-)
drivers/tty/serial/8250/8250_bcm2835aux.c +1 -3
index 36e2bb34d82b..829abef2564d 100644
@@ -245,9 +245,7 @@ static int bcm2835aux_resume(struct device *dev)
  	return 0;
  }
 
-static const struct dev_pm_ops bcm2835aux_dev_pm_ops = {
-	SYSTEM_SLEEP_PM_OPS(bcm2835aux_suspend, bcm2835aux_resume)
-};
+static DEFINE_SIMPLE_DEV_PM_OPS(bcm2835aux_dev_pm_ops, bcm2835aux_suspend, bcm2835aux_resume);
 
  static struct platform_driver bcm2835aux_serial_driver = {
  	.driver = {
#2 lore raw
Quoted 7 lines · Stefan Wahren

Am 12.08.24 um 16:35 schrieb Andy Shevchenko:

Quoted 2 lines

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

it's possible the implementation doesn't use the optimal macros here. But this sentence is a little bit confusing to me, because the code doesn't use SIMPLE_DEV_PM_OPS().

Thanks, fixed in v2:
https://lore.kernel.org/r/[email protected].

Signature · 2 lines
With Best Regards,
Andy Shevchenko