public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] serial: do not add port that is not initialized
@ 2007-07-11  0:03 Yinghai Lu
  2007-07-11  7:17 ` Russell King
  0 siblings, 1 reply; 6+ messages in thread
From: Yinghai Lu @ 2007-07-11  0:03 UTC (permalink / raw)
  To: Andrew Morton, Russell King, Bjorn Helgaas, Andi Kleen
  Cc: Linux Kernel Mailing List

[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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-07-11 21:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-11  0:03 [PATCH] serial: do not add port that is not initialized Yinghai Lu
2007-07-11  7:17 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox