serial: 8250: pnp: Annotate init and exit functions for conditional discarding

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 <andriy.shevchenko@linux.intel.com>
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/15308b3e517a9d7894d1dd1a1ad7163e78bb5929.1786697789.git.u.kleine-koenig@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Uwe Kleine-König (The Capable Hub) 2026-08-14 11:19:33 +02:00 committed by Greg Kroah-Hartman
parent a300273c45
commit 4cf187f9de

View File

@ -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);
}