]> err.no Git - linux-2.6/blobdiff - drivers/serial/dz.c
[PATCH] 8139cp: add ethtool eeprom support
[linux-2.6] / drivers / serial / dz.c
index 5ff1e834792caa2b8cc8590280378276aedc04c7..bf71bad5c34f7ff14f3d55ec66d7f6db397e50b8 100644 (file)
@@ -262,6 +262,7 @@ static inline void dz_receive_chars(struct dz_port *dport)
                }
                tty_insert_flip_char(tty, ch, flag);
              ignore_char:
+                       ;
        } while (status & DZ_DVAL);
 
        if (tty)
@@ -673,11 +674,12 @@ static void dz_reset(struct dz_port *dport)
 }
 
 #ifdef CONFIG_SERIAL_DZ_CONSOLE
-static void dz_console_put_char(struct dz_port *dport, unsigned char ch)
+static void dz_console_putchar(struct uart_port *port, int ch)
 {
+       struct dz_port *dport = (struct dz_port *)uport;
        unsigned long flags;
        int loops = 2500;
-       unsigned short tmp = ch;
+       unsigned short tmp = (unsigned char)ch;
        /* this code sends stuff out to serial device - spinning its
           wheels and waiting. */
 
@@ -693,6 +695,7 @@ static void dz_console_put_char(struct dz_port *dport, unsigned char ch)
 
        spin_unlock_irqrestore(&dport->port.lock, flags);
 }
+
 /*
  * -------------------------------------------------------------------
  * dz_console_print ()
@@ -709,11 +712,7 @@ static void dz_console_print(struct console *cons,
 #ifdef DEBUG_DZ
        prom_printf((char *) str);
 #endif
-       while (count--) {
-               if (*str == '\n')
-                       dz_console_put_char(dport, '\r');
-               dz_console_put_char(dport, *str++);
-       }
+       uart_console_write(&dport->port, str, count, dz_console_putchar);
 }
 
 static int __init dz_console_setup(struct console *co, char *options)