linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / drivers / serial / 21285.c
index 5743832..8c5c276 100644 (file)
@@ -7,6 +7,7 @@
  *
  *  $Id: 21285.c,v 1.37 2002/07/28 10:03:27 rmk Exp $
  */
+#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/tty.h>
 #include <linux/ioport.h>
@@ -374,18 +375,23 @@ 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)
 {
-       uart_console_write(&serial21285_port, s, count, serial21285_console_putchar);
+       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';
+               }
+       }
 }
 
 static void __init
@@ -478,6 +484,7 @@ static struct uart_driver serial21285_reg = {
        .owner                  = THIS_MODULE,
        .driver_name            = "ttyFB",
        .dev_name               = "ttyFB",
+       .devfs_name             = "ttyFB",
        .major                  = SERIAL_21285_MAJOR,
        .minor                  = SERIAL_21285_MINOR,
        .nr                     = 1,