/* Copy across the serial console cflag setting into the termios settings for the initial open of the port. This allows continuity between the kernel settings, and the settings init adopts when it opens the port for the first time.  */
static void uart_update_termios(struct uart_state *state)
/* Copy across the serial console cflag setting into the termios settings for the initial open of the port. This allows continuity between the kernel settings, and the settings init adopts when it opens the port for the first time.  */
static void uart_update_termios(struct uart_state *state)
{
	struct tty_struct *tty = state->port.tty;
	struct uart_port *port = state->uart_port;
	if (uart_console(port) && port->cons->cflag) {
		tty->termios->c_cflag = port->cons->cflag;
		port->cons->cflag = 0;
	}
	if (!(tty->flags & (1 << TTY_IO_ERROR))) {
		uart_change_speed(state, NULL);
		if (tty->termios->c_cflag & CBAUD)
			uart_set_mctrl(port, TIOCM_DTR | TIOCM_RTS);
	}
}