From: Triet Hoang <triet.hoang.dev@gmail.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Krzysztof Kozlowski <krzk@kernel.org>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Claudiu Beznea <claudiu.beznea@tuxon.dev>,
Michal Simek <michal.simek@amd.com>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Triet Hoang <triet.hoang.dev@gmail.com>
Subject: [PATCH v2 1/2] memory: atmel-ebi: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
Date: Tue, 25 Aug 2026 16:11:17 +0700 [thread overview]
Message-ID: <20260825091118.271720-2-triet.hoang.dev@gmail.com> (raw)
In-Reply-To: <20260825091118.271720-1-triet.hoang.dev@gmail.com>
Convert the 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 suspend
and resume callbacks, also reduces kernel size in case CONFIG_PM
or CONFIG_PM_SLEEP is disabled.
Signed-off-by: Triet Hoang <triet.hoang.dev@gmail.com>
---
drivers/memory/atmel-ebi.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/memory/atmel-ebi.c b/drivers/memory/atmel-ebi.c
index 1e8e8aba2542..3b1246e9ed66 100644
--- a/drivers/memory/atmel-ebi.c
+++ b/drivers/memory/atmel-ebi.c
@@ -610,7 +610,7 @@ static int atmel_ebi_probe(struct platform_device *pdev)
return of_platform_populate(np, NULL, NULL, dev);
}
-static __maybe_unused int atmel_ebi_resume(struct device *dev)
+static int atmel_ebi_resume(struct device *dev)
{
struct atmel_ebi *ebi = dev_get_drvdata(dev);
struct atmel_ebi_dev *ebid;
@@ -625,14 +625,14 @@ static __maybe_unused int atmel_ebi_resume(struct device *dev)
return 0;
}
-static SIMPLE_DEV_PM_OPS(atmel_ebi_pm_ops, NULL, atmel_ebi_resume);
+static DEFINE_SIMPLE_DEV_PM_OPS(atmel_ebi_pm_ops, NULL, atmel_ebi_resume);
static struct platform_driver atmel_ebi_driver = {
.probe = atmel_ebi_probe,
.driver = {
.name = "atmel-ebi",
.of_match_table = atmel_ebi_id_table,
- .pm = &atmel_ebi_pm_ops,
+ .pm = pm_sleep_ptr(&atmel_ebi_pm_ops),
},
};
builtin_platform_driver(atmel_ebi_driver);
--
2.53.0
next prev parent reply other threads:[~2026-08-25 9:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-25 9:11 [PATCH v2 0/2] memory: Convert drivers to DEFINE_SIMPLE_DEV_PM_OPS() Triet Hoang
2026-08-25 9:11 ` Triet Hoang [this message]
2026-08-25 9:11 ` [PATCH v2 2/2] memory: pl353: Convert " Triet Hoang
2026-08-25 9:13 ` [PATCH v2 0/2] memory: Convert drivers " Krzysztof Kozlowski
2026-08-25 9:21 ` 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=20260825091118.271720-2-triet.hoang.dev@gmail.com \
--to=triet.hoang.dev@gmail.com \
--cc=alexandre.belloni@bootlin.com \
--cc=claudiu.beznea@tuxon.dev \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@amd.com \
--cc=miquel.raynal@bootlin.com \
--cc=nicolas.ferre@microchip.com \
/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