diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2006-03-20 15:00:09 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-03-20 15:00:09 -0500 |
commit | d358788f3f30113e49882187d794832905e42592 (patch) | |
tree | 8c796ee4bf719dad4d3947c03cef2f3fd6cb5940 /drivers/serial/sunsab.c | |
parent | 7705a8792b0fc82fd7d4dd923724606bbfd9fb20 (diff) |
[SERIAL] kernel console should send CRLF not LFCR
Glen Turner reported that writing LFCR rather than the more
traditional CRLF causes issues with some terminals.
Since this aflicts many serial drivers, extract the common code
to a library function (uart_console_write) and arrange for each
driver to supply a "putchar" function.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/serial/sunsab.c')
-rw-r--r-- | drivers/serial/sunsab.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c index 85664228a0b6..be95eabd0394 100644 --- a/drivers/serial/sunsab.c +++ b/drivers/serial/sunsab.c | |||
@@ -861,8 +861,9 @@ static int num_channels; | |||
861 | 861 | ||
862 | #ifdef CONFIG_SERIAL_SUNSAB_CONSOLE | 862 | #ifdef CONFIG_SERIAL_SUNSAB_CONSOLE |
863 | 863 | ||
864 | static __inline__ void sunsab_console_putchar(struct uart_sunsab_port *up, char c) | 864 | static void sunsab_console_putchar(struct uart_port *port, int c) |
865 | { | 865 | { |
866 | struct uart_sunsab_port *up = (struct uart_sunsab_port *)port; | ||
866 | unsigned long flags; | 867 | unsigned long flags; |
867 | 868 | ||
868 | spin_lock_irqsave(&up->port.lock, flags); | 869 | spin_lock_irqsave(&up->port.lock, flags); |
@@ -876,13 +877,8 @@ static __inline__ void sunsab_console_putchar(struct uart_sunsab_port *up, char | |||
876 | static void sunsab_console_write(struct console *con, const char *s, unsigned n) | 877 | static void sunsab_console_write(struct console *con, const char *s, unsigned n) |
877 | { | 878 | { |
878 | struct uart_sunsab_port *up = &sunsab_ports[con->index]; | 879 | struct uart_sunsab_port *up = &sunsab_ports[con->index]; |
879 | int i; | ||
880 | 880 | ||
881 | for (i = 0; i < n; i++) { | 881 | uart_console_write(&up->port, s, n, sunsab_console_putchar); |
882 | if (*s == '\n') | ||
883 | sunsab_console_putchar(up, '\r'); | ||
884 | sunsab_console_putchar(up, *s++); | ||
885 | } | ||
886 | sunsab_tec_wait(up); | 882 | sunsab_tec_wait(up); |
887 | } | 883 | } |
888 | 884 | ||