Selaa lähdekoodia

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>
Peter Hurley 10 vuotta sitten
vanhempi
commit
51c39814b6
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      drivers/tty/serial/8250/8250_core.c

+ 1 - 1
drivers/tty/serial/8250/8250_core.c

@@ -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 */