提交 1624f003 编写于 作者: B Benjamin Herrenschmidt 提交者: Russell King

[SERIAL] Fix matching of MMIO ports

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: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 26e92861
...@@ -2307,7 +2307,7 @@ int uart_match_port(struct uart_port *port1, struct uart_port *port2) ...@@ -2307,7 +2307,7 @@ int uart_match_port(struct uart_port *port1, struct uart_port *port2)
return (port1->iobase == port2->iobase) && return (port1->iobase == port2->iobase) &&
(port1->hub6 == port2->hub6); (port1->hub6 == port2->hub6);
case UPIO_MEM: case UPIO_MEM:
return (port1->membase == port2->membase); return (port1->mapbase == port2->mapbase);
} }
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册