From: Li Jun <lijun01@kylinos.cn>
To: lijun01@kylinos.cn, andy@kernel.org, geert@linux-m68k.org,
fourier.thomas@gmail.com, bhelgaas@google.com,
u.kleine-koenig@baylibre.com, linux-kernel@vger.kernel.org
Subject: [PATCH v2] auxdisplay: arm-charlcd: Use SIMPLE_DEV_PM_OPS for power management
Date: Wed, 19 Aug 2026 16:48:38 +0800 [thread overview]
Message-ID: <20260819084838.2730348-1-lijun01@kylinos.cn> (raw)
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
next reply other threads:[~2026-08-19 8:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-19 8:48 Li Jun [this message]
2026-08-19 13:25 ` Andy Shevchenko
2026-08-20 1:39 ` lijun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260819084838.2730348-1-lijun01@kylinos.cn \
--to=lijun01@kylinos.cn \
--cc=andy@kernel.org \
--cc=bhelgaas@google.com \
--cc=fourier.thomas@gmail.com \
--cc=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=u.kleine-koenig@baylibre.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®