aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/8250.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial/8250.c')
-rw-r--r--drivers/serial/8250.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index 7c4ebe6ee18b..c3db16b7afa1 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -2408,6 +2408,21 @@ serial8250_set_termios(struct uart_port *port, struct ktermios *termios,
2408} 2408}
2409 2409
2410static void 2410static void
2411serial8250_set_ldisc(struct uart_port *port)
2412{
2413 int line = port->line;
2414
2415 if (line >= port->state->port.tty->driver->num)
2416 return;
2417
2418 if (port->state->port.tty->ldisc->ops->num == N_PPS) {
2419 port->flags |= UPF_HARDPPS_CD;
2420 serial8250_enable_ms(port);
2421 } else
2422 port->flags &= ~UPF_HARDPPS_CD;
2423}
2424
2425static void
2411serial8250_pm(struct uart_port *port, unsigned int state, 2426serial8250_pm(struct uart_port *port, unsigned int state,
2412 unsigned int oldstate) 2427 unsigned int oldstate)
2413{ 2428{
@@ -2628,6 +2643,7 @@ static struct uart_ops serial8250_pops = {
2628 .startup = serial8250_startup, 2643 .startup = serial8250_startup,
2629 .shutdown = serial8250_shutdown, 2644 .shutdown = serial8250_shutdown,
2630 .set_termios = serial8250_set_termios, 2645 .set_termios = serial8250_set_termios,
2646 .set_ldisc = serial8250_set_ldisc,
2631 .pm = serial8250_pm, 2647 .pm = serial8250_pm,
2632 .type = serial8250_type, 2648 .type = serial8250_type,
2633 .release_port = serial8250_release_port, 2649 .release_port = serial8250_release_port,