[PATCH v1 6/6] serial: 8250: pnp: Annotate init and exit functions for conditional discarding
Uwe Kleine-König <[email protected]> Fri, 31 Jul 2026 11:39:09 +0200
| Newsgroups | org.kernel.vger.linux-serial,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <8db68a66238fec8be60620ff78e8e02b8f139c4f.1785489518.git.ukleinek@kernel.org> |
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 <[email protected]> --- 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