[PATCH v2] auxdisplay: arm-charlcd: Use SIMPLE_DEV_PM_OPS for power management

Li Jun posted 1 patch 1 month, 1 week ago
drivers/auxdisplay/arm-charlcd.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
[PATCH v2] auxdisplay: arm-charlcd: Use SIMPLE_DEV_PM_OPS for power management
Posted by Li Jun 1 month, 1 week ago
Replace the manually defined dev_pm_ops structure with the
SIMPLE_DEV_PM_OPS macro to simplify the power management code.
This macro automatically handles CONFIG_PM_SLEEP configuration
and generates freeze/thaw/poweroff/restore callbacks, reducing
boilerplate code.

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
Re: [PATCH v2] auxdisplay: arm-charlcd: Use SIMPLE_DEV_PM_OPS for power management
Posted by Andy Shevchenko 1 month, 1 week ago
On Wed, Aug 19, 2026 at 04:48:38PM +0800, Li Jun wrote:
> Replace the manually defined dev_pm_ops structure with the
> SIMPLE_DEV_PM_OPS macro to simplify the power management code.
> This macro automatically handles CONFIG_PM_SLEEP configuration
> and generates freeze/thaw/poweroff/restore callbacks, reducing
> boilerplate code.

This is v2, no changelog, all v1 comments were ignored. What's going on?

-- 
With Best Regards,
Andy Shevchenko
Re: [PATCH v2] auxdisplay: arm-charlcd: Use SIMPLE_DEV_PM_OPS for power management
Posted by lijun 1 month, 1 week ago
I am so sorry for the previous email,and the subsequent mailing has 
corrected these errors.

2026/8/19 21:25, Andy Shevchenko :
> On Wed, Aug 19, 2026 at 04:48:38PM +0800, Li Jun wrote:
>> Replace the manually defined dev_pm_ops structure with the
>> SIMPLE_DEV_PM_OPS macro to simplify the power management code.
>> This macro automatically handles CONFIG_PM_SLEEP configuration
>> and generates freeze/thaw/poweroff/restore callbacks, reducing
>> boilerplate code.
> This is v2, no changelog, all v1 comments were ignored. What's going on?
>