Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[safe/jmp/linux-2.6] / drivers / serial / nwpserial.c
index 32f3eaf..e1ab8ec 100644 (file)
@@ -126,7 +126,7 @@ static void nwpserial_config_port(struct uart_port *port, int flags)
 static irqreturn_t nwpserial_interrupt(int irq, void *dev_id)
 {
        struct nwpserial_port *up = dev_id;
-       struct tty_struct *tty = up->port.info->port.tty;
+       struct tty_struct *tty = up->port.state->port.tty;
        irqreturn_t ret;
        unsigned int iir;
        unsigned char ch;
@@ -145,11 +145,13 @@ static irqreturn_t nwpserial_interrupt(int irq, void *dev_id)
                ch = dcr_read(up->dcr_host, UART_RX);
                if (up->port.ignore_status_mask != NWPSERIAL_STATUS_RXVALID)
                        tty_insert_flip_char(tty, ch, TTY_NORMAL);
-       } while (dcr_read(up->dcr_host, UART_RX) & UART_LSR_DR);
+       } while (dcr_read(up->dcr_host, UART_LSR) & UART_LSR_DR);
 
        tty_flip_buffer_push(tty);
        ret = IRQ_HANDLED;
 
+       /* clear interrupt */
+       dcr_write(up->dcr_host, UART_IIR, 1);
 out:
        spin_unlock(&up->port.lock);
        return ret;
@@ -259,7 +261,7 @@ static void nwpserial_start_tx(struct uart_port *port)
        struct nwpserial_port *up;
        struct circ_buf *xmit;
        up = container_of(port, struct nwpserial_port, port);
-       xmit  = &up->port.info->xmit;
+       xmit  = &up->port.state->xmit;
 
        if (port->x_char) {
                nwpserial_putchar(up, up->port.x_char);