Skip to content

Commit

Permalink
[SERIAL] Fix matching of MMIO ports
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Benjamin Herrenschmidt authored and Russell King committed Jan 4, 2006
1 parent 26e9286 commit 1624f00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/serial/serial_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 1624f00

Please sign in to comment.