Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] memory: atmel-ebi: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
@ 2026-08-21  7:42 Triet Hoang
  2026-08-21  7:45 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 4+ messages in thread
From: Triet Hoang @ 2026-08-21  7:42 UTC (permalink / raw)
  To: krzk
  Cc: nicolas.ferre, alexandre.belloni, claudiu.beznea, linux-kernel,
	linux-arm-kernel, Triet Hoang

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 its 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



^ permalink raw reply related	[flat|nested] 4+ messages in thread
* Re: [PATCH] memory: pl353: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
@ 2026-08-21  7:45 Krzysztof Kozlowski
  2026-08-21  8:10 ` [PATCH] memory: atmel-ebi: " Triet Hoang
  0 siblings, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2026-08-21  7:45 UTC (permalink / raw)
  To: Triet Hoang, miquel.raynal; +Cc: michal.simek, linux-arm-kernel, linux-kernel

On 21/08/2026 09:44, Triet Hoang wrote:
> 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 its 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>
> ---

So I should respond to every email?

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-08-21  8:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-21  7:42 [PATCH] memory: atmel-ebi: Convert to DEFINE_SIMPLE_DEV_PM_OPS() Triet Hoang
2026-08-21  7:45 ` Krzysztof Kozlowski
2026-08-21  7:57   ` Triet Hoang
  -- strict thread matches above, loose matches on Subject: below --
2026-08-21  7:45 [PATCH] memory: pl353: " Krzysztof Kozlowski
2026-08-21  8:10 ` [PATCH] memory: atmel-ebi: " Triet Hoang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox