diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2014-07-15 11:26:48 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-07-17 21:19:40 -0400 |
commit | 3d1c90d48cbe335a47a6a5a05ff731a86eacf6fb (patch) | |
tree | 7c8284953f2a22d1ef0d40c85ffd53152aae1fb7 /drivers/tty | |
parent | 4622eb687374ff042c79211d46bbd107c02f27d8 (diff) |
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')
-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 e7d1aaf07294..afe2e75695e7 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]; | |||
304 | #if defined(CONFIG_SERIAL_ALTERA_JTAGUART_CONSOLE) | 304 | #if defined(CONFIG_SERIAL_ALTERA_JTAGUART_CONSOLE) |
305 | 305 | ||
306 | #if defined(CONFIG_SERIAL_ALTERA_JTAGUART_CONSOLE_BYPASS) | 306 | #if defined(CONFIG_SERIAL_ALTERA_JTAGUART_CONSOLE_BYPASS) |
307 | static void altera_jtaguart_console_putc(struct console *co, const char c) | 307 | static void altera_jtaguart_console_putc(struct console *co, int c) |
308 | { | 308 | { |
309 | struct uart_port *port = &(altera_jtaguart_ports + co->index)->port; | 309 | struct uart_port *port = &(altera_jtaguart_ports + co->index)->port; |
310 | unsigned long status; | 310 | unsigned long status; |
@@ -325,7 +325,7 @@ static void altera_jtaguart_console_putc(struct console *co, const char c) | |||
325 | spin_unlock_irqrestore(&port->lock, flags); | 325 | spin_unlock_irqrestore(&port->lock, flags); |
326 | } | 326 | } |
327 | #else | 327 | #else |
328 | static void altera_jtaguart_console_putc(struct console *co, const char c) | 328 | static void altera_jtaguart_console_putc(struct console *co, int c) |
329 | { | 329 | { |
330 | struct uart_port *port = &(altera_jtaguart_ports + co->index)->port; | 330 | struct uart_port *port = &(altera_jtaguart_ports + co->index)->port; |
331 | unsigned long flags; | 331 | unsigned long flags; |
@@ -345,11 +345,9 @@ static void altera_jtaguart_console_putc(struct console *co, const char c) | |||
345 | static void altera_jtaguart_console_write(struct console *co, const char *s, | 345 | static void altera_jtaguart_console_write(struct console *co, const char *s, |
346 | unsigned int count) | 346 | unsigned int count) |
347 | { | 347 | { |
348 | for (; count; count--, s++) { | 348 | struct uart_port *port = &(altera_jtaguart_ports + co->index)->port; |
349 | altera_jtaguart_console_putc(co, *s); | 349 | |
350 | if (*s == '\n') | 350 | uart_console_write(port, s, count, altera_jtaguart_console_putc); |
351 | altera_jtaguart_console_putc(co, '\r'); | ||
352 | } | ||
353 | } | 351 | } |
354 | 352 | ||
355 | static int __init altera_jtaguart_console_setup(struct console *co, | 353 | static int __init altera_jtaguart_console_setup(struct console *co, |