From: "Uwe Kleine-König" <ukleinek@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>
Cc: Hugo Villeneuve <hvilleneuve@dimonoff.com>,
Rahul Bukte <rahul.bukte@sony.com>,
linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org
Subject: [PATCH v1 6/6] serial: 8250: pnp: Annotate init and exit functions for conditional discarding
Date: Fri, 31 Jul 2026 11:39:09 +0200 [thread overview]
Message-ID: <8db68a66238fec8be60620ff78e8e02b8f139c4f.1785489518.git.ukleinek@kernel.org> (raw)
In-Reply-To: <cover.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 <ukleinek@kernel.org>
---
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
prev parent reply other threads:[~2026-07-31 9:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-31 9:39 [PATCH v1 0/6] serial: Some yak shaving Uwe Kleine-König
2026-07-31 9:39 ` [PATCH v1 1/6] serial: txx9: Drop noop probe function and dangerous remove callback Uwe Kleine-König
2026-07-31 9:39 ` [PATCH v1 2/6] serial: txx9: Drop usage of uart_match_port() Uwe Kleine-König
2026-08-03 14:46 ` Greg Kroah-Hartman
2026-08-03 18:57 ` Uwe Kleine-König
2026-08-03 17:27 ` Ilpo Järvinen
2026-08-03 18:59 ` Uwe Kleine-König
2026-07-31 9:39 ` [PATCH v1 3/6] serial: 8250: Make uart_match_port() a 8250 specific function Uwe Kleine-König
2026-08-03 17:23 ` Ilpo Järvinen
2026-08-03 19:22 ` Hugo Villeneuve
2026-07-31 9:39 ` [PATCH v1 4/6] serial: 8250: Fix corner case for port matching Uwe Kleine-König
2026-07-31 9:39 ` [PATCH v1 5/6] serial: 8250: hub6: Add cleanup code Uwe Kleine-König
2026-07-31 9:39 ` Uwe Kleine-König [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8db68a66238fec8be60620ff78e8e02b8f139c4f.1785489518.git.ukleinek@kernel.org \
--to=ukleinek@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=hvilleneuve@dimonoff.com \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=rahul.bukte@sony.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®