diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index 8379e3fa01625d14ae69f63053d0da26d53b3276..a373eff44ae8aece13552e20a5f16092ef4ec71b 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -2682,6 +2682,7 @@ int uart_add_one_port(struct uart_driver *drv, struct uart_port *uport) state->pm_state = UART_PM_STATE_UNDEFINED; uport->cons = drv->cons; + uport->minor = drv->tty_driver->minor_start + uport->line; /* * If this port is a console, then the spinlock is already diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index b0148e7bcbfa0ad8bc5686f2ea8d60b5c663f99a..980170e5a982adc7ffd9929d69c82049f87827c0 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 */