summaryrefslogtreecommitdiffstats
path: root/include/linux/serial_core.h
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2015-02-24 14:25:00 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-26 16:10:11 +0100
commit959801fef94b7ee66ea2c713229637a7e1770890 (patch)
treec9b020e008b67662c065aba921044932b9d9071c /include/linux/serial_core.h
parentd3157b2ca59ceb9ad1b72cad09535a343f315667 (diff)
downloadlinux-stable-959801fef94b7ee66ea2c713229637a7e1770890.tar.gz
linux-stable-959801fef94b7ee66ea2c713229637a7e1770890.tar.bz2
linux-stable-959801fef94b7ee66ea2c713229637a7e1770890.zip
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>
Diffstat (limited to 'include/linux/serial_core.h')
-rw-r--r--include/linux/serial_core.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index b0148e7bcbfa..980170e5a982 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -235,6 +235,7 @@ struct uart_port {
const struct uart_ops *ops;
unsigned int custom_divisor;
unsigned int line; /* port index */
+ unsigned int minor;
resource_size_t mapbase; /* for ioremap */
struct device *dev; /* parent device */
unsigned char hub6; /* this should be in the 8250 driver */