serial-uartlite: Initialize port parameters in console_setup
PATCH 1/1 serial-uartlite: Initialize port parameters in console_setup
Hi Andrew,
Initialize port parameters in console_setup so port timeout is set to something sensible even if user space never calls set_termios.
Signed-off-by Peter Korsgaard <[email protected]>
drivers/serial/uartlite.c +8 -1
@@ -358,6 +358,10 @@static int __init ulite_console_setup (struct console *co,char *options) {struct uart_port *port; +int baud =9600 ; +int bits =8 ; +int parity ='n' ; +int flow ='n' ;if (co->index <0 || co->index >=ULITE_NR_UARTS )return -EINVAL ;
@@ -368,7 +372,10 @@if (!port->membase)return -ENODEV ; -return 0 ; +if (options) +uart_parse_options (options, &baud, &parity, &bits, &flow); + +return uart_set_options (port, co, baud, parity, bits, flow); }static struct uart_driver ulite_uart_driver;
Signature · 1 line
Bye, Peter Korsgaard