serial: core: Add minor field to uart_port
authorPeter Hurley <peter@hurleysoftware.com>
Tue, 24 Feb 2015 19:25:00 +0000 (14:25 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Mar 2015 15:10:11 +0000 (16:10 +0100)
commit959801fef94b7ee66ea2c713229637a7e1770890
treec9b020e008b67662c065aba921044932b9d9071c
parentd3157b2ca59ceb9ad1b72cad09535a343f315667
serial: core: Add minor field to uart_port

UART drivers that share ttyS namespace cannot trivially compute the
ttyS index from the port->line value since the minor_start may be
offset from minor 64. Further, to do so requires a pointer to the
uart driver since there is no back pointer from uart_port to
uart_driver.

Rather than have UART drivers computing the minor value by themselves,
encapsulate within the serial core at port registration time.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/serial_core.c
include/linux/serial_core.h