mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] auxdisplay: pm: use SIMPLE_DEV_PM_OPS for pm struct
@ 2026-08-19  3:31 Li Jun
  2026-08-19  7:55 ` Andy Shevchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Li Jun @ 2026-08-19  3:31 UTC (permalink / raw)
  To: lijun01, andy, geert, fourier.thomas, bhelgaas, u.kleine-koenig,
	linux-kernel

use SIMPLE_DEV_PM_OPS for charlcd_pm_ops,and add the value of
.freeze .thaw .poweroff .restore.

Signed-off-by: Li Jun <lijun01@kylinos.cn>
---
 drivers/auxdisplay/arm-charlcd.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/auxdisplay/arm-charlcd.c b/drivers/auxdisplay/arm-charlcd.c
index 70efda4f767e..8cb6e39a63b6 100644
--- a/drivers/auxdisplay/arm-charlcd.c
+++ b/drivers/auxdisplay/arm-charlcd.c
@@ -306,10 +306,7 @@ static int charlcd_resume(struct device *dev)
 	return 0;
 }
 
-static const struct dev_pm_ops charlcd_pm_ops = {
-	.suspend = charlcd_suspend,
-	.resume = charlcd_resume,
-};
+static SIMPLE_DEV_PM_OPS(charlcd_pm_ops, charlcd_suspend, charlcd_resume);
 
 static const struct of_device_id charlcd_match[] = {
 	{ .compatible = "arm,versatile-lcd", },
-- 
2.25.1


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

* Re: [PATCH] auxdisplay: pm: use SIMPLE_DEV_PM_OPS for pm struct
  2026-08-19  3:31 [PATCH] auxdisplay: pm: use SIMPLE_DEV_PM_OPS for pm struct Li Jun
@ 2026-08-19  7:55 ` Andy Shevchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Shevchenko @ 2026-08-19  7:55 UTC (permalink / raw)
  To: Li Jun
  Cc: andy, geert, fourier.thomas, bhelgaas, u.kleine-koenig, linux-kernel

On Wed, Aug 19, 2026 at 11:31:42AM +0800, Li Jun wrote:
> use SIMPLE_DEV_PM_OPS for charlcd_pm_ops,and add the value of
> .freeze .thaw .poweroff .restore.

Respect English grammar and punctuation.

...

> -static const struct dev_pm_ops charlcd_pm_ops = {
> -	.suspend = charlcd_suspend,
> -	.resume = charlcd_resume,
> -};
> +static SIMPLE_DEV_PM_OPS(charlcd_pm_ops, charlcd_suspend, charlcd_resume);

No, see what it says about this
https://elixir.bootlin.com/linux/v7.2/source/include/linux/pm.h#L436

Use DEFINE_SIMPLE_DEV_PM_OPS() and the respective pm_sleep_ptr() macro.

...

Hint: there are tons of patches like this in the Git history for the last few
years, just grep over them to see the examples how this change should look
like.


-- 
With Best Regards,
Andy Shevchenko



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

end of thread, other threads:[~2026-08-19  7:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-19  3:31 [PATCH] auxdisplay: pm: use SIMPLE_DEV_PM_OPS for pm struct Li Jun
2026-08-19  7:55 ` Andy Shevchenko

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®