public inbox for dmaengine@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/1] dmaengine: idma64: switch to DEFINE_SIMPLE_DEV_PM_OPS()
@ 2026-01-29 10:49 Andy Shevchenko
  2026-01-29 18:37 ` kernel test robot
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Andy Shevchenko @ 2026-01-29 10:49 UTC (permalink / raw)
  To: Andy Shevchenko, dmaengine, linux-kernel; +Cc: Vinod Koul

SET_*_PM_OPS() are deprecated, replace it with DEFINE_SIMPLE_DEV_PM_OPS()
and use pm_sleep_ptr() for setting the driver's PM routines. We can now
remove the __maybe_unused qualifier in the suspend and resume functions.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/dma/idma64.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/dma/idma64.c b/drivers/dma/idma64.c
index d147353d47ab..d1197d68df94 100644
--- a/drivers/dma/idma64.c
+++ b/drivers/dma/idma64.c
@@ -671,7 +671,7 @@ static void idma64_platform_remove(struct platform_device *pdev)
 	idma64_remove(chip);
 }
 
-static int __maybe_unused idma64_pm_suspend(struct device *dev)
+static int idma64_pm_suspend(struct device *dev)
 {
 	struct idma64_chip *chip = dev_get_drvdata(dev);
 
@@ -679,7 +679,7 @@ static int __maybe_unused idma64_pm_suspend(struct device *dev)
 	return 0;
 }
 
-static int __maybe_unused idma64_pm_resume(struct device *dev)
+static int idma64_pm_resume(struct device *dev)
 {
 	struct idma64_chip *chip = dev_get_drvdata(dev);
 
@@ -687,16 +687,14 @@ static int __maybe_unused idma64_pm_resume(struct device *dev)
 	return 0;
 }
 
-static const struct dev_pm_ops idma64_dev_pm_ops = {
-	SET_SYSTEM_SLEEP_PM_OPS(idma64_pm_suspend, idma64_pm_resume)
-};
+static DEFINE_SIMPLE_DEV_PM_OPS(idma64_pm_suspend, idma64_pm_resume);
 
 static struct platform_driver idma64_platform_driver = {
 	.probe		= idma64_platform_probe,
 	.remove		= idma64_platform_remove,
 	.driver = {
 		.name	= LPSS_IDMA64_DRIVER_NAME,
-		.pm	= &idma64_dev_pm_ops,
+		.pm	= pm_sleep_ptr(&idma64_dev_pm_ops),
 	},
 };
 
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-01-30  5:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-29 10:49 [PATCH v1 1/1] dmaengine: idma64: switch to DEFINE_SIMPLE_DEV_PM_OPS() Andy Shevchenko
2026-01-29 18:37 ` kernel test robot
2026-01-29 18:49 ` kernel test robot
2026-01-29 19:52 ` kernel test robot
2026-01-30  5:16 ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox