Skip to content

Commit

Permalink
serial: 8250: Compute ttyS index from port minor
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Hurley authored and Greg Kroah-Hartman committed Mar 26, 2015
1 parent 959801f commit 51c3981
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/tty/serial/8250/8250_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ static struct uart_driver serial8250_reg;

static int serial_index(struct uart_port *port)
{
return (serial8250_reg.minor - 64) + port->line;
return port->minor - 64;
}

static unsigned int skip_txen_test; /* force skip of txen test at init time */
Expand Down

0 comments on commit 51c3981

Please sign in to comment.