From: Yinghai Lu <Yinghai.Lu@Sun.COM>
To: Andrew Morton <akpm@linux-foundation.org>,
Russell King <rmk@arm.linux.org.uk>,
Bjorn Helgaas <bjorn.helgaas@hp.com>, Andi Kleen <ak@suse.de>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH] serial: do not add port that is not initialized
Date: Tue, 10 Jul 2007 17:03:35 -0700 [thread overview]
Message-ID: <200707101703.36173.yinghai.lu@sun.com> (raw)
[PATCH] serial: do not add port that is not initialized
if the port is not initialized with correct iobase, and membase, we don't
need to add that port.
for x86, when pnpacpi is enabled, we will not get extra ttyS1/ttyS2/ttyS3 in
/sys/devices/platform/serial8250/tty
Sign-off-by: Yinghai Lu <yinghai.lu@sun.com>
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index c84dab0..6399014 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -2425,9 +2425,12 @@ serial8250_register_ports(struct uart_driver *drv, struct device *dev)
for (i = 0; i < nr_uarts; i++) {
struct uart_8250_port *up = &serial8250_ports[i];
+ if (!up->port.iobase && !up->port.membase)
+ continue;
up->port.dev = dev;
uart_add_one_port(drv, &up->port);
}
+
}
#ifdef CONFIG_SERIAL_8250_CONSOLE
next reply other threads:[~2007-07-11 0:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-11 0:03 Yinghai Lu [this message]
2007-07-11 7:17 ` [PATCH] serial: do not add port that is not initialized Russell King
2007-07-11 16:05 ` Bjorn Helgaas
2007-07-11 19:40 ` Russell King
2007-07-11 20:45 ` Yinghai Lu
2007-07-11 21:48 ` Russell King
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=200707101703.36173.yinghai.lu@sun.com \
--to=yinghai.lu@sun.com \
--cc=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=bjorn.helgaas@hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rmk@arm.linux.org.uk \
/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