]> err.no Git - linux-2.6/commitdiff
[SERIAL] Fix matching of MMIO ports
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 4 Jan 2006 18:09:44 +0000 (18:09 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 4 Jan 2006 18:09:44 +0000 (18:09 +0000)
The function uart_match_port() incorrectly compares the ioremap'd
virtual addresses of ports instead of the physical address to find
duplicate ports for MMIO based UARTs. This fixes it.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
drivers/serial/serial_core.c

index c17d680e3f04ddfe954b02e763a390aef2cd7478..34c576dfad8dbd08290f023baeafc3b0941cd7ff 100644 (file)
@@ -2307,7 +2307,7 @@ int uart_match_port(struct uart_port *port1, struct uart_port *port2)
                return (port1->iobase == port2->iobase) &&
                       (port1->hub6   == port2->hub6);
        case UPIO_MEM:
-               return (port1->membase == port2->membase);
+               return (port1->mapbase == port2->mapbase);
        }
        return 0;
 }