diff options
-rw-r--r-- | drivers/serial/serial_core.c | 10 | ||||
-rw-r--r-- | include/linux/serial_core.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c index 53b03c629aff..951a75ea6e3e 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, int ldisc) | ||
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 | { |
@@ -2288,6 +2297,7 @@ static const struct tty_operations uart_ops = { | |||
2288 | .unthrottle = uart_unthrottle, | 2297 | .unthrottle = uart_unthrottle, |
2289 | .send_xchar = uart_send_xchar, | 2298 | .send_xchar = uart_send_xchar, |
2290 | .set_termios = uart_set_termios, | 2299 | .set_termios = uart_set_termios, |
2300 | .set_ldisc = uart_set_ldisc, | ||
2291 | .stop = uart_stop, | 2301 | .stop = uart_stop, |
2292 | .start = uart_start, | 2302 | .start = uart_start, |
2293 | .hangup = uart_hangup, | 2303 | .hangup = uart_hangup, |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index d32123ae08ad..d8f31de632c5 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -192,6 +192,7 @@ struct uart_ops { | |||
192 | void (*shutdown)(struct uart_port *); | 192 | void (*shutdown)(struct uart_port *); |
193 | void (*set_termios)(struct uart_port *, struct ktermios *new, | 193 | void (*set_termios)(struct uart_port *, struct ktermios *new, |
194 | struct ktermios *old); | 194 | struct ktermios *old); |
195 | void (*set_ldisc)(struct uart_port *); | ||
195 | void (*pm)(struct uart_port *, unsigned int state, | 196 | void (*pm)(struct uart_port *, unsigned int state, |
196 | unsigned int oldstate); | 197 | unsigned int oldstate); |
197 | int (*set_wake)(struct uart_port *, unsigned int state); | 198 | int (*set_wake)(struct uart_port *, unsigned int state); |