diff options
Diffstat (limited to 'drivers/serial/serial_core.c')
-rw-r--r-- | drivers/serial/serial_core.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c index 53b03c629aff..42d2e108b679 100644 --- a/drivers/serial/serial_core.c +++ b/drivers/serial/serial_core.c | |||
@@ -1165,6 +1165,15 @@ out: | |||
1165 | return ret; | 1165 | return ret; |
1166 | } | 1166 | } |
1167 | 1167 | ||
1168 | static void uart_set_ldisc(struct tty_struct *tty) | ||
1169 | { | ||
1170 | struct uart_state *state = tty->driver_data; | ||
1171 | struct uart_port *port = state->port; | ||
1172 | |||
1173 | if (port->ops->set_ldisc) | ||
1174 | port->ops->set_ldisc(port); | ||
1175 | } | ||
1176 | |||
1168 | static void uart_set_termios(struct tty_struct *tty, | 1177 | static void uart_set_termios(struct tty_struct *tty, |
1169 | struct ktermios *old_termios) | 1178 | struct ktermios *old_termios) |
1170 | { | 1179 | { |
@@ -1982,7 +1991,9 @@ struct uart_match { | |||
1982 | static int serial_match_port(struct device *dev, void *data) | 1991 | static int serial_match_port(struct device *dev, void *data) |
1983 | { | 1992 | { |
1984 | struct uart_match *match = data; | 1993 | struct uart_match *match = data; |
1985 | dev_t devt = MKDEV(match->driver->major, match->driver->minor) + match->port->line; | 1994 | struct tty_driver *tty_drv = match->driver->tty_driver; |
1995 | dev_t devt = MKDEV(tty_drv->major, tty_drv->minor_start) + | ||
1996 | match->port->line; | ||
1986 | 1997 | ||
1987 | return dev->devt == devt; /* Actually, only one tty per port */ | 1998 | return dev->devt == devt; /* Actually, only one tty per port */ |
1988 | } | 1999 | } |
@@ -2288,6 +2299,7 @@ static const struct tty_operations uart_ops = { | |||
2288 | .unthrottle = uart_unthrottle, | 2299 | .unthrottle = uart_unthrottle, |
2289 | .send_xchar = uart_send_xchar, | 2300 | .send_xchar = uart_send_xchar, |
2290 | .set_termios = uart_set_termios, | 2301 | .set_termios = uart_set_termios, |
2302 | .set_ldisc = uart_set_ldisc, | ||
2291 | .stop = uart_stop, | 2303 | .stop = uart_stop, |
2292 | .start = uart_start, | 2304 | .start = uart_start, |
2293 | .hangup = uart_hangup, | 2305 | .hangup = uart_hangup, |