diff options
author | Peter Hurley <peter@hurleysoftware.com> | 2015-02-24 14:25:01 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-26 11:14:27 -0400 |
commit | 51c39814b6b23c0d7b0c47ba9236248576a164ad (patch) | |
tree | 719352fd2d7ba95846d280d5324bef4e3f880d20 | |
parent | 959801fef94b7ee66ea2c713229637a7e1770890 (diff) |
serial: 8250: Compute ttyS index from port minor
Prepare for 8250 split; calculate the ttyS index directly from
the port minor which avoids the global serial8250_reg reference
from base port operations.
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/tty/serial/8250/8250_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c index 7b502c0a848f..b7f2d6c0d003 100644 --- a/drivers/tty/serial/8250/8250_core.c +++ b/drivers/tty/serial/8250/8250_core.c | |||
@@ -61,7 +61,7 @@ static struct uart_driver serial8250_reg; | |||
61 | 61 | ||
62 | static int serial_index(struct uart_port *port) | 62 | static int serial_index(struct uart_port *port) |
63 | { | 63 | { |
64 | return (serial8250_reg.minor - 64) + port->line; | 64 | return port->minor - 64; |
65 | } | 65 | } |
66 | 66 | ||
67 | static unsigned int skip_txen_test; /* force skip of txen test at init time */ | 67 | static unsigned int skip_txen_test; /* force skip of txen test at init time */ |