summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/serial/8250.c20
-rw-r--r--drivers/serial/serial_core.c3
-rw-r--r--include/linux/serial_core.h1
3 files changed, 3 insertions, 21 deletions
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index 0f0c7e1690dc..2b8dbc06a911 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -2388,26 +2388,6 @@ static struct platform_device *serial8250_isa_devs;
*/
static DECLARE_MUTEX(serial_sem);
-/*
- * Are the two ports equivalent?
- */
-static int uart_match_port(struct uart_port *port1, struct uart_port *port2)
-{
- if (port1->iotype != port2->iotype)
- return 0;
-
- switch (port1->iotype) {
- case UPIO_PORT:
- return (port1->iobase == port2->iobase);
- case UPIO_HUB6:
- return (port1->iobase == port2->iobase) &&
- (port1->hub6 == port2->hub6);
- case UPIO_MEM:
- return (port1->membase == port2->membase);
- }
- return 0;
-}
-
static struct uart_8250_port *serial8250_find_match_or_unused(struct uart_port *port)
{
int i;
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index 16c227d30016..36b1ae083fb7 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -2233,7 +2233,7 @@ int uart_remove_one_port(struct uart_driver *drv, struct uart_port *port)
/*
* Are the two ports equivalent?
*/
-static int uart_match_port(struct uart_port *port1, struct uart_port *port2)
+int uart_match_port(struct uart_port *port1, struct uart_port *port2)
{
if (port1->iotype != port2->iotype)
return 0;
@@ -2249,6 +2249,7 @@ static int uart_match_port(struct uart_port *port1, struct uart_port *port2)
}
return 0;
}
+EXPORT_SYMBOL(uart_match_port);
/*
* Try to find an unused uart_state slot for a port.
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index b71f1e8c31af..a456436aabb3 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -357,6 +357,7 @@ void uart_unregister_port(struct uart_driver *reg, int line);
int uart_register_port(struct uart_driver *reg, struct uart_port *port);
int uart_add_one_port(struct uart_driver *reg, struct uart_port *port);
int uart_remove_one_port(struct uart_driver *reg, struct uart_port *port);
+int uart_match_port(struct uart_port *port1, struct uart_port *port2);
/*
* Power Management