Skip to contentSkip to conversation

memory: atmel-ebi: Convert to DEFINE_SIMPLE_DEV_PM_OPS()

PATCH In review Triet Hoang 2 participants 3 messages Aug 21

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

PATCH 1/1 memory: atmel-ebi: 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/atmel-ebi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/memory/atmel-ebi.c +3 -3
index 1e8e8aba2542..3b1246e9ed66 100644
@@ -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);
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.

---

Stop right there, before you spam me more like here:

https://lore.kernel.org/all/?q=f%3Atriet.hoang.dev%40gmail.com

Organize your patches in patchsets targeting subsystems. ALL your patches.

Best regards,
Krzysztof

#2 lore raw
Quoted 5 lines · On Fri, 21 Aug 2026 09:45:34 +0200 Krzysztof Kozlowski <[email protected]> wrote:

Stop right there, before you spam me more like here:

https://lore.kernel.org/all/?q=f%3Atriet.hoang.dev%40gmail.com

Organize your patches in patchsets targeting subsystems. ALL your patches.

Hi Krzysztof,

I am very sorry about the spam.
I did not mean to send so many separate patches.

This was due to my lack of experience with git send-email and with organizing patches into subsystem-based patchsets. Thank you for pointing this out.

I will wait for your review of the patches I have already sent before sending anything further.

Regards,
Triet