[SERIAL] dz: Fix compilation error
[powerpc.git] / drivers / serial / dz.c
index a64ba26..8a98aae 100644 (file)
@@ -26,7 +26,6 @@
 
 #undef DEBUG_DZ
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/interrupt.h>
 #include <linux/init.h>
@@ -262,6 +261,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)
@@ -650,7 +650,7 @@ static void __init dz_init_ports(void)
        for (i = 0, dport = dz_ports; i < DZ_NB_PORT; i++, dport++) {
                spin_lock_init(&dport->port.lock);
                dport->port.membase     = (char *) base;
-               dport->port.iotype      = SERIAL_IO_PORT;
+               dport->port.iotype      = UPIO_PORT;
                dport->port.irq         = dec_interrupt[DEC_IRQ_DZ11];
                dport->port.line        = i;
                dport->port.fifosize    = 1;
@@ -673,11 +673,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 *uport, 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 +694,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 +711,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)
@@ -769,11 +767,7 @@ void __init dz_serial_console_init(void)
 static struct uart_driver dz_reg = {
        .owner                  = THIS_MODULE,
        .driver_name            = "serial",
-#ifdef CONFIG_DEVFS
-       .dev_name               = "tts/%d",
-#else
        .dev_name               = "ttyS%d",
-#endif
        .major                  = TTY_MAJOR,
        .minor                  = 64,
        .nr                     = DZ_NB_PORT,
@@ -803,7 +797,7 @@ int __init dz_init(void)
        restore_flags(flags);
 
        if (request_irq(dz_ports[0].port.irq, dz_interrupt,
-                       SA_INTERRUPT, "DZ", &dz_ports[0]))
+                       IRQF_DISABLED, "DZ", &dz_ports[0]))
                panic("Unable to register DZ interrupt");
 
        ret = uart_register_driver(&dz_reg);