diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c index 5f7ba1adb309c20d6d2abe9a4847f77473e4519d..d7e28ab4c3132a37d959e268629f5b5a5a1545ec 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) {