]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/serial/21285.c
Merge branch 'upstream'
[linux-2.6-omap-h63xx.git] / drivers / serial / 21285.c
index 8c5c276c55771eb297fa756ed2cf23e0159d8fc2..7572665a885516d89ece6dcb5898154a14be2916 100644 (file)
@@ -375,23 +375,18 @@ static void serial21285_setup_ports(void)
 }
 
 #ifdef CONFIG_SERIAL_21285_CONSOLE
+static void serial21285_console_putchar(struct uart_port *port, int ch)
+{
+       while (*CSR_UARTFLG & 0x20)
+               barrier();
+       *CSR_UARTDR = ch;
+}
 
 static void
 serial21285_console_write(struct console *co, const char *s,
                          unsigned int count)
 {
-       int i;
-
-       for (i = 0; i < count; i++) {
-               while (*CSR_UARTFLG & 0x20)
-                       barrier();
-               *CSR_UARTDR = s[i];
-               if (s[i] == '\n') {
-                       while (*CSR_UARTFLG & 0x20)
-                               barrier();
-                       *CSR_UARTDR = '\r';
-               }
-       }
+       uart_console_write(&serial21285_port, s, count, serial21285_console_putchar);
 }
 
 static void __init