aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/tty/serial/altera_jtaguart.c12
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)
307static void altera_jtaguart_console_putc(struct console *co, const char c) 307static 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
328static void altera_jtaguart_console_putc(struct console *co, const char c) 328static 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)
345static void altera_jtaguart_console_write(struct console *co, const char *s, 345static 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
355static int __init altera_jtaguart_console_setup(struct console *co, 353static int __init altera_jtaguart_console_setup(struct console *co,