summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorQipan Li <Qipan.Li@csr.com>2015-05-14 08:45:26 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-05-24 21:50:41 +0200
commitc35b49b7166b8054ce33827d5dfd8d6041f5b4df (patch)
treeb655af15f9db894aeb6d4542bce10960277534f4 /drivers/tty
parentserial: sirf: add serial loopback function support (diff)
downloadlinux-c35b49b7166b8054ce33827d5dfd8d6041f5b4df.tar.xz
linux-c35b49b7166b8054ce33827d5dfd8d6041f5b4df.zip
serial: sirf: assign console default index if users not set a valid one
it seems this is a more typical behaviour from reviewing other console drivers. Signed-off-by: Qipan Li <Qipan.Li@csr.com> Signed-off-by: Barry Song <Baohua.Song@csr.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/sirfsoc_uart.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/sirfsoc_uart.c b/drivers/tty/serial/sirfsoc_uart.c
index 0e4379939703..8d759629ffb0 100644
--- a/drivers/tty/serial/sirfsoc_uart.c
+++ b/drivers/tty/serial/sirfsoc_uart.c
@@ -1236,7 +1236,7 @@ sirfsoc_uart_console_setup(struct console *co, char *options)
struct sirfsoc_uart_port *sirfport;
struct sirfsoc_register *ureg;
if (co->index < 0 || co->index >= SIRFSOC_UART_NR)
- return -EINVAL;
+ co->index = 1;
sirfport = sirf_ports[co->index];
if (!sirfport)
return -ENODEV;