summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergei Shtylyov <sshtylyov@ru.mvista.com>2006-09-03 22:04:20 +0200
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-10-01 18:06:57 +0200
commit6c6a2334a1e8af7c3eaab992732825fa9ade77cf (patch)
treeb4eb67c9698c8fac9426dd16695306d20f6e3a35
parent[SERIAL] suspend/resume handlers don't have level arg anymore (diff)
downloadlinux-6c6a2334a1e8af7c3eaab992732825fa9ade77cf.tar.xz
linux-6c6a2334a1e8af7c3eaab992732825fa9ade77cf.zip
[SERIAL] Make uart_line_info() correctly tell MMIO from I/O port
/proc/tty/driver/serial incorrectly claims that UARTs having iotype of UPIO_MEM32, UPIO_AU, or UPIO_TSI are I/O mapped. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--drivers/serial/serial_core.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index 5f7ba1adb309..d7e28ab4c313 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -1662,16 +1662,16 @@ static int uart_line_info(char *buf, struct uart_driver *drv, int i)
struct uart_port *port = state->port;
char stat_buf[32];
unsigned int status;
- int ret;
+ int mmio, ret;
if (!port)
return 0;
+ mmio = port->iotype >= UPIO_MEM;
ret = sprintf(buf, "%d: uart:%s %s%08lX irq:%d",
port->line, uart_type(port),
- port->iotype == UPIO_MEM ? "mmio:0x" : "port:",
- port->iotype == UPIO_MEM ? port->mapbase :
- (unsigned long) port->iobase,
+ mmio ? "mmio:0x" : "port:",
+ mmio ? port->mapbase : (unsigned long) port->iobase,
port->irq);
if (port->type == PORT_UNKNOWN) {