* Re-enable the console device after suspending.
*/
if (uart_console(port)) {
- uart_change_speed(state, NULL);
+ struct termios termios;
+
+ /*
+ * First try to use the console cflag setting.
+ */
+ memset(&termios, 0, sizeof(struct termios));
+ termios.c_cflag = port->cons->cflag;
+
+ /*
+ * If that's unset, use the tty termios setting.
+ */
+ if (state->info && state->info->tty && termios.c_cflag == 0)
+ termios = *state->info->tty->termios;
+
+ port->ops->set_termios(port, &termios, NULL);
console_start(port->cons);
}
/*
* Are the two ports equivalent?
*/
-static int uart_match_port(struct uart_port *port1, struct uart_port *port2)
+int uart_match_port(struct uart_port *port1, struct uart_port *port2)
{
if (port1->iotype != port2->iotype)
return 0;
}
return 0;
}
+EXPORT_SYMBOL(uart_match_port);
/*
* Try to find an unused uart_state slot for a port.