Skip to contentSkip to conversation

memory: pl353: Convert to DEFINE_SIMPLE_DEV_PM_OPS()

PATCH In review Triet Hoang 3 participants 5 messages Aug 21 – Aug 25

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 memory: pl353: Convert to DEFINE_SIMPLE_DEV_PM_OPS()

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.

---
 drivers/memory/pl353-smc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/memory/pl353-smc.c +4 -4
index 28a8cc56003c..047e42c8715a 100644
@@ -25,7 +25,7 @@ struct pl353_smc_data {
 	struct clk		*aclk;
 };
 
-static int __maybe_unused pl353_smc_suspend(struct device *dev)
+static int pl353_smc_suspend(struct device *dev)
 {
 	struct pl353_smc_data *pl353_smc = dev_get_drvdata(dev);
 
@@ -35,7 +35,7 @@ static int __maybe_unused pl353_smc_suspend(struct device *dev)
 	return 0;
 }
 
-static int __maybe_unused pl353_smc_resume(struct device *dev)
+static int pl353_smc_resume(struct device *dev)
 {
 	struct pl353_smc_data *pl353_smc = dev_get_drvdata(dev);
 	int ret;
@@ -56,7 +56,7 @@ static int __maybe_unused pl353_smc_resume(struct device *dev)
 	return ret;
 }
 
-static SIMPLE_DEV_PM_OPS(pl353_smc_dev_pm_ops, pl353_smc_suspend,
+static DEFINE_SIMPLE_DEV_PM_OPS(pl353_smc_dev_pm_ops, pl353_smc_suspend,
 			 pl353_smc_resume);
 
 static const struct of_device_id pl353_smc_supported_children[] = {
@@ -121,7 +121,7 @@ MODULE_DEVICE_TABLE(amba, pl353_ids);
 static struct amba_driver pl353_smc_driver = {
 	.drv = {
 		.name = "pl353-smc",
-		.pm = &pl353_smc_dev_pm_ops,
+		.pm = pm_sleep_ptr(&pl353_smc_dev_pm_ops),
 	},
 	.id_table = pl353_ids,
 	.probe = pl353_smc_probe,
Signature · 1 line
2.53.0
#1 lore raw
Quoted 11 lines · 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.

---

So I should respond to every email?

Best regards,
Krzysztof

#2 lore raw

Re: [PATCH] memory: atmel-ebi: Convert to DEFINE_SIMPLE_DEV_PM_OPS()

Quoted 1 line · On Fri, 21 Aug 2026 09:45:50 +0200 Krzysztof Kozlowski <[email protected]> wrote:

So I should respond to every email?

Hi Krzysztof,

I am sorry for the inconvenience.
I understand that I should have organized the patches into subsystem-based patchsets instead of sending them separately.

Currently, I only have these two patches for the memory controller subsystem. Could you please review them? I will make sure to organize my patches properly in the future.

Thank you for your patience and guidance.

Regards,
Triet

maintainer Reviewed-by on v1 1/1
#3 lore raw
In reply to Triet Hoang

Hi Triet,

Quoted 8 lines · 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.

Here is the occasion for sending a v2 with your two patches: wrapping at 50 chars is abusive :)

Other than that, I guess the diff is fine.

#4 lore raw
Quoted 6 lines · Miquel Raynal

Here is the occasion for sending a v2 with your two patches: wrapping at 50 chars is abusive :)

Other than that, I guess the diff is fine.

Thanks for your review. I will correct this and send the v2.

Regards,
Triet