From: Richard GENOUD <richard.genoud@bootlin.com>
To: Li Jun <lijun01@kylinos.cn>,
gregkh@linuxfoundation.org, jirislaby@kernel.org,
nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com,
claudiu.beznea@tuxon.dev, linux-serial@vger.kernel.org
Subject: Re: [PATCH] tty: atmel: Replace SIMPLE_DEV_PM_OPS with DEFINE_SIMPLE_DEV_PM_OPS
Date: Tue, 20 Oct 2026 10:47:40 +0200 [thread overview]
Message-ID: <745706ca-58cc-48cb-8ef1-69a69aa34ac2@bootlin.com> (raw)
In-Reply-To: <20261020084113.853878-1-lijun01@kylinos.cn>
Le 20/10/2026 à 10:41, Li Jun a écrit :
> Replace the deprecated SIMPLE_DEV_PM_OPS with DEFINE_SIMPLE_DEV_PM_OPS.
> This also drops the __maybe_unused annotations on the suspend/resume
> callbacks, since pm_sleep_ptr() inside the new macro already handles
> the case where CONFIG_PM_SLEEP is disabled.
> When CONFIG_PM=y but CONFIG_PM_SLEEP=n (a valid configuration that
> enables runtime PM but disables system suspend/hibernation), this
> keeps a completely empty dev_pm_ops structure -- all callbacks are
> NULL -- as dead code in the object file.Modify pm_ptr to pm_sleep_ptr.
>
Re-addind my acked-by, since it wasn't gather
(For next time, when you resend a patch, you may add [PATCH RESEND] in
the subject)
Acked-by: Richard Genoud <richard.genoud@bootlin.com>
> Signed-off-by: Li Jun <lijun01@kylinos.cn>
> ---
> drivers/tty/serial/atmel_serial.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
> index 5d8c1cfc1c60..c3880259e3bc 100644
> --- a/drivers/tty/serial/atmel_serial.c
> +++ b/drivers/tty/serial/atmel_serial.c
> @@ -2723,7 +2723,7 @@ static bool atmel_serial_clk_will_stop(void)
> #endif
> }
>
> -static int __maybe_unused atmel_serial_suspend(struct device *dev)
> +static int atmel_serial_suspend(struct device *dev)
> {
> struct uart_port *port = dev_get_drvdata(dev);
> struct atmel_uart_port *atmel_port = to_atmel_uart_port(port);
> @@ -2765,7 +2765,7 @@ static int __maybe_unused atmel_serial_suspend(struct device *dev)
> return 0;
> }
>
> -static int __maybe_unused atmel_serial_resume(struct device *dev)
> +static int atmel_serial_resume(struct device *dev)
> {
> struct uart_port *port = dev_get_drvdata(dev);
> struct atmel_uart_port *atmel_port = to_atmel_uart_port(port);
> @@ -2996,7 +2996,7 @@ static void atmel_serial_remove(struct platform_device *pdev)
> pdev->dev.of_node = NULL;
> }
>
> -static SIMPLE_DEV_PM_OPS(atmel_serial_pm_ops, atmel_serial_suspend,
> +static DEFINE_SIMPLE_DEV_PM_OPS(atmel_serial_pm_ops, atmel_serial_suspend,
> atmel_serial_resume);
>
> static struct platform_driver atmel_serial_driver = {
> @@ -3005,7 +3005,7 @@ static struct platform_driver atmel_serial_driver = {
> .driver = {
> .name = "atmel_usart_serial",
> .of_match_table = of_match_ptr(atmel_serial_dt_ids),
> - .pm = pm_ptr(&atmel_serial_pm_ops),
> + .pm = pm_sleep_ptr(&atmel_serial_pm_ops),
> },
> };
>
--
Richard Genoud, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2026-10-20 8:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-20 8:41 [PATCH] tty: atmel: Replace SIMPLE_DEV_PM_OPS with DEFINE_SIMPLE_DEV_PM_OPS Li Jun
2026-10-20 8:47 ` Richard GENOUD [this message]
2026-10-20 9:22 ` lijun
2026-10-20 8:53 ` sashiko-bot
-- strict thread matches above, loose matches on Subject: below --
2026-09-08 11:37 Li Jun
2026-09-08 11:44 ` sashiko-bot
2026-09-25 13:40 ` Richard GENOUD
2026-10-20 8:29 ` Richard GENOUD
2026-10-20 8:34 ` 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=745706ca-58cc-48cb-8ef1-69a69aa34ac2@bootlin.com \
--to=richard.genoud@bootlin.com \
--cc=alexandre.belloni@bootlin.com \
--cc=claudiu.beznea@tuxon.dev \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=lijun01@kylinos.cn \
--cc=linux-serial@vger.kernel.org \
--cc=nicolas.ferre@microchip.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.