Re: [PATCH] auxdisplay: pm: use SIMPLE_DEV_PM_OPS for pm struct
From: Andy Shevchenko
Date: Wed Aug 19 2026 - 03:58:09 EST
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