[PATCH 2/8] watchdog: da9062: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
From: Triet Hoang
Date: Wed Aug 26 2026 - 02:10:38 EST
Convert deprecated SIMPLE_DEV_PM_OPS() to DEFINE_SIMPLE_DEV_PM_OPS()
and pm_sleep_ptr().
This lets us drop the __maybe_unused annotations from the resume callback.
Signed-off-by: Triet Hoang <triet.hoang.dev@xxxxxxxxx>
---
drivers/watchdog/da9062_wdt.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/watchdog/da9062_wdt.c b/drivers/watchdog/da9062_wdt.c
index 426962547df1..2b6946478527 100644
--- a/drivers/watchdog/da9062_wdt.c
+++ b/drivers/watchdog/da9062_wdt.c
@@ -248,7 +248,7 @@ static int da9062_wdt_probe(struct platform_device *pdev)
return devm_watchdog_register_device(dev, &wdt->wdtdev);
}
-static int __maybe_unused da9062_wdt_suspend(struct device *dev)
+static int da9062_wdt_suspend(struct device *dev)
{
struct watchdog_device *wdd = dev_get_drvdata(dev);
struct da9062_watchdog *wdt = watchdog_get_drvdata(wdd);
@@ -262,7 +262,7 @@ static int __maybe_unused da9062_wdt_suspend(struct device *dev)
return 0;
}
-static int __maybe_unused da9062_wdt_resume(struct device *dev)
+static int da9062_wdt_resume(struct device *dev)
{
struct watchdog_device *wdd = dev_get_drvdata(dev);
struct da9062_watchdog *wdt = watchdog_get_drvdata(wdd);
@@ -276,14 +276,14 @@ static int __maybe_unused da9062_wdt_resume(struct device *dev)
return 0;
}
-static SIMPLE_DEV_PM_OPS(da9062_wdt_pm_ops,
+static DEFINE_SIMPLE_DEV_PM_OPS(da9062_wdt_pm_ops,
da9062_wdt_suspend, da9062_wdt_resume);
static struct platform_driver da9062_wdt_driver = {
.probe = da9062_wdt_probe,
.driver = {
.name = "da9062-watchdog",
- .pm = &da9062_wdt_pm_ops,
+ .pm = pm_sleep_ptr(&da9062_wdt_pm_ops),
.of_match_table = da9062_compatible_id_table,
},
};
--
2.53.0