mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Triet Hoang <triet.hoang.dev@gmail.com>
To: linux@roeck-us.net, tzungbi@kernel.org
Cc: linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org,
	triet.hoang.dev@gmail.com, wim@linux-watchdog.org
Subject: [PATCH v2 7/8] watchdog: sp805_wdt: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
Date: Mon, 14 Sep 2026 15:54:50 +0700	[thread overview]
Message-ID: <20260914085451.891675-8-triet.hoang.dev@gmail.com> (raw)
In-Reply-To: <20260914085451.891675-1-triet.hoang.dev@gmail.com>

Convert deprecated SIMPLE_DEV_PM_OPS() to DEFINE_SIMPLE_DEV_PM_OPS()
and pm_ptr().

This lets us drop the __maybe_unused annotations from the resume callback.

Signed-off-by: Triet Hoang <triet.hoang.dev@gmail.com>
---
 drivers/watchdog/sp805_wdt.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/watchdog/sp805_wdt.c b/drivers/watchdog/sp805_wdt.c
index c2125f204a13..73f821e2611a 100644
--- a/drivers/watchdog/sp805_wdt.c
+++ b/drivers/watchdog/sp805_wdt.c
@@ -321,7 +321,7 @@ static void sp805_wdt_remove(struct amba_device *adev)
 	watchdog_set_drvdata(&wdt->wdd, NULL);
 }
 
-static int __maybe_unused sp805_wdt_suspend(struct device *dev)
+static int sp805_wdt_suspend(struct device *dev)
 {
 	struct sp805_wdt *wdt = dev_get_drvdata(dev);
 
@@ -331,7 +331,7 @@ static int __maybe_unused sp805_wdt_suspend(struct device *dev)
 	return 0;
 }
 
-static int __maybe_unused sp805_wdt_resume(struct device *dev)
+static int sp805_wdt_resume(struct device *dev)
 {
 	struct sp805_wdt *wdt = dev_get_drvdata(dev);
 
@@ -341,8 +341,7 @@ static int __maybe_unused sp805_wdt_resume(struct device *dev)
 	return 0;
 }
 
-static SIMPLE_DEV_PM_OPS(sp805_wdt_dev_pm_ops, sp805_wdt_suspend,
-		sp805_wdt_resume);
+static DEFINE_SIMPLE_DEV_PM_OPS(sp805_wdt_dev_pm_ops, sp805_wdt_suspend, sp805_wdt_resume);
 
 static const struct amba_id sp805_wdt_ids[] = {
 	{
@@ -361,7 +360,7 @@ MODULE_DEVICE_TABLE(amba, sp805_wdt_ids);
 static struct amba_driver sp805_wdt_driver = {
 	.drv = {
 		.name	= MODULE_NAME,
-		.pm	= &sp805_wdt_dev_pm_ops,
+		.pm	= pm_ptr(&sp805_wdt_dev_pm_ops),
 	},
 	.id_table	= sp805_wdt_ids,
 	.probe		= sp805_wdt_probe,
-- 
2.53.0


  parent reply	other threads:[~2026-09-14  8:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-14  8:54 [PATCH v2 0/8] watchdog: Convert drivers " Triet Hoang
2026-09-14  8:54 ` [PATCH v2 1/8] watchdog: cadence_wdt: Convert " Triet Hoang
2026-09-14  8:54 ` [PATCH v2 2/8] watchdog: da9062: " Triet Hoang
2026-09-14  8:54 ` [PATCH v2 3/8] watchdog: keembay_wdt: " Triet Hoang
2026-09-14  9:21   ` Triet Hoang
2026-09-14  8:54 ` [PATCH v2 4/8] watchdog: msc313e_wdt: " Triet Hoang
2026-09-14  8:54 ` [PATCH v2 5/8] watchdog: of_xilinx_wdt: " Triet Hoang
2026-09-14  8:54 ` [PATCH v2 6/8] watchdog: pm8916_wdt: " Triet Hoang
2026-09-14  8:54 ` Triet Hoang [this message]
2026-09-14  8:54 ` [PATCH v2 8/8] watchdog: stmp3xxx_rtc_wdt: " Triet Hoang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260914085451.891675-8-triet.hoang.dev@gmail.com \
    --to=triet.hoang.dev@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=tzungbi@kernel.org \
    --cc=wim@linux-watchdog.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®