summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorDaniel Thompson <daniel.thompson@linaro.org>2014-07-11 14:00:11 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-11 17:49:46 -0700
commit2970b7f5ea3cea2f169ca23fd863e24d03748ffd (patch)
treed0780d9e56fa2c51dd7a3c80047fdd4e201b320b /drivers/tty
parentd36f47fa841984691a05ca6477dd26064963048c (diff)
serial: altera: Adopt uart_console_write()
This driver does not currently use uart_console_write() and instead provides is own LF to LFCR conversion in it's console_write() method. We should use the library function instead. Cmopile tested only (with ARCH=arm). Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org> Cc: Tobias Klauser <tklauser@distanz.ch> Cc: Jiri Slaby <jslaby@suse.cz> Cc: linux-serial@vger.kernel.org Cc: nios2-dev@lists.rocketboards.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/altera_uart.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/tty/serial/altera_uart.c b/drivers/tty/serial/altera_uart.c
index 4c1eae93110..6a243239dbe 100644
--- a/drivers/tty/serial/altera_uart.c
+++ b/drivers/tty/serial/altera_uart.c
@@ -430,7 +430,7 @@ static struct altera_uart altera_uart_ports[CONFIG_SERIAL_ALTERA_UART_MAXPORTS];
#if defined(CONFIG_SERIAL_ALTERA_UART_CONSOLE)
-static void altera_uart_console_putc(struct uart_port *port, const char c)
+static void altera_uart_console_putc(struct uart_port *port, int c)
{
while (!(altera_uart_readl(port, ALTERA_UART_STATUS_REG) &
ALTERA_UART_STATUS_TRDY_MSK))
@@ -444,11 +444,7 @@ static void altera_uart_console_write(struct console *co, const char *s,
{
struct uart_port *port = &(altera_uart_ports + co->index)->port;
- for (; count; count--, s++) {
- altera_uart_console_putc(port, *s);
- if (*s == '\n')
- altera_uart_console_putc(port, '\r');
- }
+ uart_console_write(port, s, count, altera_uart_console_putc);
}
static int __init altera_uart_console_setup(struct console *co, char *options)