From: "Martin Hundebøll" <martin@geanix.com>
To: linux-serial@vger.kernel.org
Cc: "Martin Hundebøll" <martin@geanix.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
Subject: [PATCH v2 2/3] serial: 8250: allow zero runtime-configured ports
Date: Tue, 18 Oct 2022 15:34:18 +0200 [thread overview]
Message-ID: <20221018133419.134110-2-martin@geanix.com> (raw)
In-Reply-To: <20221018133419.134110-1-martin@geanix.com>
One should be able to set CONFIG_SERIAL_8250_RUNTIME_UARTS=0 on
platforms with zero built-in 8250-like ports. However, that case was
prohibited in commit 59cfc45f17d6
("serial: 8250: Do nothing if nr_uarts=0"), because of missing array
initialization, effectively disabling the driver entirely.
The missing array initialization has been fixed in the previous commit,
so remove check for zero runtime ports. Said check gets to stay when
initializing early consoles, though, because that makes sense for
built-in ports only.
Signed-off-by: Martin Hundebøll <martin@geanix.com>
---
drivers/tty/serial/8250/8250_core.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
index a166cc66e7d1..ba48431ec6e2 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -680,9 +680,6 @@ static struct console univ8250_console = {
static int __init univ8250_console_init(void)
{
- if (nr_uarts == 0)
- return -ENODEV;
-
serial8250_isa_init_ports();
register_console(&univ8250_console);
return 0;
@@ -1171,9 +1168,6 @@ static int __init serial8250_init(void)
{
int ret;
- if (nr_uarts == 0)
- return -ENODEV;
-
serial8250_isa_init_ports();
pr_info("Serial: 8250/16550 driver, %d ports, IRQ sharing %sabled\n",
--
2.38.0
next prev parent reply other threads:[~2022-10-18 13:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-18 13:34 [PATCH v2 1/3] serial: 8250: allow use of non-runtime configured uart ports Martin Hundebøll
2022-10-18 13:34 ` Martin Hundebøll [this message]
2022-10-18 13:34 ` [PATCH v2 3/3] serial: 8250: skip platform device registration with no runtime ports Martin Hundebøll
2022-10-20 13:00 ` Ilpo Järvinen
2022-10-20 12:34 ` [PATCH v2 1/3] serial: 8250: allow use of non-runtime configured uart ports Ilpo Järvinen
2022-10-20 14:10 ` Martin Hundebøll
2022-10-20 14:14 ` Ilpo Järvinen
2022-10-20 18:34 ` Martin Hundebøll
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=20221018133419.134110-2-martin@geanix.com \
--to=martin@geanix.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-serial@vger.kernel.org \
/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