* [PATCH] serial: sh-sci: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
@ 2025-07-09 19:00 Geert Uytterhoeven
2025-07-09 19:03 ` Geert Uytterhoeven
0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2025-07-09 19:00 UTC (permalink / raw)
To: Alexandre Belloni, Wolfram Sang
Cc: linux-rtc, linux-renesas-soc, linux-sh, Geert Uytterhoeven
Convert the Renesas SuperH SCI(F) serial port driver from
SIMPLE_DEV_PM_OPS() to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr().
This lets us drop the __maybe_unused annotations from its suspend and
resume callbacks, and reduces kernel size in case CONFIG_PM or
CONFIG_PM_SLEEP is disabled.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/tty/serial/sh-sci.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index 1c356544a832a0c2..fa5773f56a7e577e 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -3702,7 +3702,7 @@ static int sci_probe(struct platform_device *dev)
return 0;
}
-static __maybe_unused int sci_suspend(struct device *dev)
+static int sci_suspend(struct device *dev)
{
struct sci_port *sport = dev_get_drvdata(dev);
@@ -3720,7 +3720,7 @@ static __maybe_unused int sci_suspend(struct device *dev)
return 0;
}
-static __maybe_unused int sci_resume(struct device *dev)
+static int sci_resume(struct device *dev)
{
struct sci_port *sport = dev_get_drvdata(dev);
@@ -3741,14 +3741,14 @@ static __maybe_unused int sci_resume(struct device *dev)
return 0;
}
-static SIMPLE_DEV_PM_OPS(sci_dev_pm_ops, sci_suspend, sci_resume);
+static DEFINE_SIMPLE_DEV_PM_OPS(sci_dev_pm_ops, sci_suspend, sci_resume);
static struct platform_driver sci_driver = {
.probe = sci_probe,
.remove = sci_remove,
.driver = {
.name = "sh-sci",
- .pm = &sci_dev_pm_ops,
+ .pm = pm_sleep_ptr(&sci_dev_pm_ops),
.of_match_table = of_match_ptr(of_sci_match),
},
};
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] serial: sh-sci: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
2025-07-09 19:00 [PATCH] serial: sh-sci: Convert to DEFINE_SIMPLE_DEV_PM_OPS() Geert Uytterhoeven
@ 2025-07-09 19:03 ` Geert Uytterhoeven
0 siblings, 0 replies; 2+ messages in thread
From: Geert Uytterhoeven @ 2025-07-09 19:03 UTC (permalink / raw)
To: Alexandre Belloni, Wolfram Sang; +Cc: linux-rtc, linux-renesas-soc, linux-sh
On Wed, 9 Jul 2025 at 21:00, Geert Uytterhoeven <geert+renesas@glider.be> wrote:
> Convert the Renesas SuperH SCI(F) serial port driver from
My apologies, this was not meant to be sent to the RTC subsystem.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-07-09 19:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-09 19:00 [PATCH] serial: sh-sci: Convert to DEFINE_SIMPLE_DEV_PM_OPS() Geert Uytterhoeven
2025-07-09 19:03 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).