[PATCH v3 7/7] serial: 8250: pnp: Annotate init and exit functions for conditional discarding
Uwe Kleine-König (The Capable Hub) <[email protected]>
| Newsgroups | org.kernel.vger.linux-serial,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <15308b3e517a9d7894d1dd1a1ad7163e78bb5929.1786697789.git.u.kleine-koenig@baylibre.com> |
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. Acked-by: Andy Shevchenko <[email protected]> Signed-off-by: Uwe Kleine-König (The Capable Hub) <[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 6bfdeff5fe22..7decf62400ab 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