[PATCH v1 6/6] serial: 8250: pnp: Annotate init and exit functions for conditional discarding
From: Uwe Kleine-König
Date: Fri Jul 31 2026 - 05:40:49 EST
serial8250_pnp_init() is only called from serial8250_init() which is
marked with __init, so the pnp init function can also get the same
marking. serial8250_pnp_exit() is only called from __init and __exit
code, so __init_or_module is appropriate for that.
Signed-off-by: Uwe Kleine-König <ukleinek@xxxxxxxxxx>
---
drivers/tty/serial/8250/8250_pnp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/8250/8250_pnp.c b/drivers/tty/serial/8250/8250_pnp.c
index b39f005f11cf..e142f4296062 100644
--- a/drivers/tty/serial/8250/8250_pnp.c
+++ b/drivers/tty/serial/8250/8250_pnp.c
@@ -526,12 +526,12 @@ static struct pnp_driver serial_pnp_driver = {
.id_table = pnp_dev_table,
};
-int serial8250_pnp_init(void)
+int __init serial8250_pnp_init(void)
{
return pnp_register_driver(&serial_pnp_driver);
}
-void serial8250_pnp_exit(void)
+void __init_or_module serial8250_pnp_exit(void)
{
pnp_unregister_driver(&serial_pnp_driver);
}
--
2.55.0.11.g153666a7d9bb