diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2014-07-15 17:26:48 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-07-17 18:19:40 -0700 |
commit | 3d1c90d48cbe335a47a6a5a05ff731a86eacf6fb (patch) | |
tree | 7c8284953f2a22d1ef0d40c85ffd53152aae1fb7 /drivers/tty/serial/altera_jtaguart.c | |
parent | 4622eb687374ff042c79211d46bbd107c02f27d8 (diff) | |
download | op-kernel-dev-3d1c90d48cbe335a47a6a5a05ff731a86eacf6fb.zip op-kernel-dev-3d1c90d48cbe335a47a6a5a05ff731a86eacf6fb.tar.gz |
serial: altera_jtaguart: Adpot uart_console_write()
Follow commit 2970b7f5ea3c ("serial: altera: Adopt
uart_console_write()") and don't open code the LF to LFCR conversion in
altera_jtaguart either. Use uart_console_write() instead.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/altera_jtaguart.c')
-rw-r--r-- | drivers/tty/serial/altera_jtaguart.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/tty/serial/altera_jtaguart.c b/drivers/tty/serial/altera_jtaguart.c index e7d1aaf..afe2e75 100644 --- a/drivers/tty/serial/altera_jtaguart.c +++ b/drivers/tty/serial/altera_jtaguart.c @@ -304,7 +304,7 @@ static struct altera_jtaguart altera_jtaguart_ports[ALTERA_JTAGUART_MAXPORTS]; #if defined(CONFIG_SERIAL_ALTERA_JTAGUART_CONSOLE) #if defined(CONFIG_SERIAL_ALTERA_JTAGUART_CONSOLE_BYPASS) -static void altera_jtaguart_console_putc(struct console *co, const char c) +static void altera_jtaguart_console_putc(struct console *co, int c) { struct uart_port *port = &(altera_jtaguart_ports + co->index)->port; unsigned long status; @@ -325,7 +325,7 @@ static void altera_jtaguart_console_putc(struct console *co, const char c) spin_unlock_irqrestore(&port->lock, flags); } #else -static void altera_jtaguart_console_putc(struct console *co, const char c) +static void altera_jtaguart_console_putc(struct console *co, int c) { struct uart_port *port = &(altera_jtaguart_ports + co->index)->port; unsigned long flags; @@ -345,11 +345,9 @@ static void altera_jtaguart_console_putc(struct console *co, const char c) static void altera_jtaguart_console_write(struct console *co, const char *s, unsigned int count) { - for (; count; count--, s++) { - altera_jtaguart_console_putc(co, *s); - if (*s == '\n') - altera_jtaguart_console_putc(co, '\r'); - } + struct uart_port *port = &(altera_jtaguart_ports + co->index)->port; + + uart_console_write(port, s, count, altera_jtaguart_console_putc); } static int __init altera_jtaguart_console_setup(struct console *co, |