Serial: Allow port type to be specified when calling serial8250_register_port.
[safe/jmp/linux-2.6] / drivers / serial / m32r_sio.c
index c85ac1a..611c97a 100644 (file)
@@ -325,7 +325,7 @@ static void m32r_sio_enable_ms(struct uart_port *port)
 
 static void receive_chars(struct uart_sio_port *up, int *status)
 {
-       struct tty_struct *tty = up->port.info->tty;
+       struct tty_struct *tty = up->port.info->port.tty;
        unsigned char ch;
        unsigned char flag;
        int max_count = 256;
@@ -421,7 +421,7 @@ static void transmit_chars(struct uart_sio_port *up)
                up->port.icount.tx++;
                if (uart_circ_empty(xmit))
                        break;
-               while (!serial_in(up, UART_LSR) & UART_LSR_THRE);
+               while (!(serial_in(up, UART_LSR) & UART_LSR_THRE));
 
        } while (--count > 0);
 
@@ -539,7 +539,7 @@ static void serial_do_unlink(struct irq_info *i, struct uart_sio_port *up)
 static int serial_link_irq_chain(struct uart_sio_port *up)
 {
        struct irq_info *i = irq_lists + up->port.irq;
-       int ret, irq_flags = up->port.flags & UPF_SHARE_IRQ ? IRQF_SHARED : 0;
+       int ret, irq_flags = 0;
 
        spin_lock_irq(&i->lock);
 
@@ -590,7 +590,7 @@ static void m32r_sio_timeout(unsigned long data)
        sts = sio_in(up, SIOSTS);
        if (sts & 0x5) {
                spin_lock(&up->port.lock);
-               m32r_sio_handle_port(up, sts, NULL);
+               m32r_sio_handle_port(up, sts);
                spin_unlock(&up->port.lock);
        }
 
@@ -699,7 +699,7 @@ static unsigned int m32r_sio_get_divisor(struct uart_port *port,
 }
 
 static void m32r_sio_set_termios(struct uart_port *port,
-       struct termios *termios, struct termios *old)
+       struct ktermios *termios, struct ktermios *old)
 {
        struct uart_sio_port *up = (struct uart_sio_port *)port;
        unsigned char cval = 0;
@@ -922,7 +922,7 @@ static void m32r_sio_config_port(struct uart_port *port, int flags)
 static int
 m32r_sio_verify_port(struct uart_port *port, struct serial_struct *ser)
 {
-       if (ser->irq >= NR_IRQS || ser->irq < 0 ||
+       if (ser->irq >= nr_irqs || ser->irq < 0 ||
            ser->baud_base < 9600 || ser->type < PORT_UNKNOWN ||
            ser->type >= ARRAY_SIZE(uart_config))
                return -EINVAL;
@@ -1160,9 +1160,9 @@ static int __init m32r_sio_init(void)
 {
        int ret, i;
 
-       printk(KERN_INFO "Serial: M32R SIO driver $Revision: 1.11 $ ");
+       printk(KERN_INFO "Serial: M32R SIO driver\n");
 
-       for (i = 0; i < NR_IRQS; i++)
+       for (i = 0; i < nr_irqs; i++)
                spin_lock_init(&irq_lists[i].lock);
 
        ret = uart_register_driver(&m32r_sio_reg);
@@ -1189,4 +1189,4 @@ EXPORT_SYMBOL(m32r_sio_suspend_port);
 EXPORT_SYMBOL(m32r_sio_resume_port);
 
 MODULE_LICENSE("GPL");
-MODULE_DESCRIPTION("Generic M32R SIO serial driver $Revision: 1.11 $");
+MODULE_DESCRIPTION("Generic M32R SIO serial driver");