[SERIAL] Use uart_match_port() to find a matching port in find_port()
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index 076bf84..ad20d2d 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -2299,9 +2299,7 @@
for (line = 0; line < UART_NR; line++) {
port = &serial8250_ports[line].port;
- if (p->iotype == port->iotype &&
- p->iobase == port->iobase &&
- p->membase == port->membase)
+ if (uart_match_port(p, port))
return line;
}
return -ENODEV;