serial: core: Pass termios to set_ldisc() notifications
authorPeter Hurley <peter@hurleysoftware.com>
Wed, 5 Nov 2014 18:11:43 +0000 (13:11 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Nov 2014 22:57:27 +0000 (14:57 -0800)
UART drivers which enable modem status interrupts when switching
to N_PPS line discipline need to determine if modem status
interrupts should be disabled when switching from N_PPS.
Specifically, the set_ldisc() notification needs to evaluate
UART_ENABLE_MS() which requires termios->c_cflag.

Convert in-tree UART drivers to new interface.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_core.c
drivers/tty/serial/amba-pl010.c
drivers/tty/serial/atmel_serial.c
drivers/tty/serial/bfin_uart.c
drivers/tty/serial/clps711x.c
drivers/tty/serial/serial_core.c
include/linux/serial_core.h

index 2235032..116b5a7 100644 (file)
@@ -2609,9 +2609,9 @@ serial8250_set_termios(struct uart_port *port, struct ktermios *termios,
 }
 
 static void
-serial8250_set_ldisc(struct uart_port *port, int new)
+serial8250_set_ldisc(struct uart_port *port, struct ktermios *termios)
 {
-       if (new == N_PPS) {
+       if (termios->c_line == N_PPS) {
                port->flags |= UPF_HARDPPS_CD;
                serial8250_enable_ms(port);
        } else
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge