[PATCH 4/8] watchdog: msc313e_wdt: Convert to DEFINE_SIMPLE_DEV_PM_OPS()

From: Triet Hoang

Date: Wed Aug 26 2026 - 02:09:39 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/msc313e_wdt.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/watchdog/msc313e_wdt.c b/drivers/watchdog/msc313e_wdt.c
index d962589e2c55..10de94205600 100644
--- a/drivers/watchdog/msc313e_wdt.c
+++ b/drivers/watchdog/msc313e_wdt.c
@@ -132,7 +132,7 @@ static int msc313e_wdt_probe(struct platform_device *pdev)
return devm_watchdog_register_device(dev, &priv->wdev);
}

-static int __maybe_unused msc313e_wdt_suspend(struct device *dev)
+static int msc313e_wdt_suspend(struct device *dev)
{
struct msc313e_wdt_priv *priv = dev_get_drvdata(dev);

@@ -142,7 +142,7 @@ static int __maybe_unused msc313e_wdt_suspend(struct device *dev)
return 0;
}

-static int __maybe_unused msc313e_wdt_resume(struct device *dev)
+static int msc313e_wdt_resume(struct device *dev)
{
struct msc313e_wdt_priv *priv = dev_get_drvdata(dev);

@@ -152,13 +152,13 @@ static int __maybe_unused msc313e_wdt_resume(struct device *dev)
return 0;
}

-static SIMPLE_DEV_PM_OPS(msc313e_wdt_pm_ops, msc313e_wdt_suspend, msc313e_wdt_resume);
+static DEFINE_SIMPLE_DEV_PM_OPS(msc313e_wdt_pm_ops, msc313e_wdt_suspend, msc313e_wdt_resume);

static struct platform_driver msc313e_wdt_driver = {
.driver = {
.name = "msc313e-wdt",
.of_match_table = msc313e_wdt_of_match,
- .pm = &msc313e_wdt_pm_ops,
+ .pm = pm_sleep_ptr(&msc313e_wdt_pm_ops),
},
.probe = msc313e_wdt_probe,
};
--
2.53.0