[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260129104916.200484-1-andriy.shevchenko@linux.intel.com>
Date: Thu, 29 Jan 2026 11:49:16 +0100
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
dmaengine@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Vinod Koul <vkoul@...nel.org>
Subject: [PATCH v1 1/1] dmaengine: idma64: switch to DEFINE_SIMPLE_DEV_PM_OPS()
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@...ux.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
Powered by blists - more mailing lists