Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
[safe/jmp/linux-2.6] / drivers / serial / zs.c
index 9e6a873..1a7fd3e 100644 (file)
@@ -231,7 +231,7 @@ static int zs_receive_drain(struct zs_port *zport)
 {
        int loops = 10000;
 
-       while ((read_zsreg(zport, R0) & Rx_CH_AV) && loops--)
+       while ((read_zsreg(zport, R0) & Rx_CH_AV) && --loops)
                read_zsdata(zport);
        return loops;
 }
@@ -241,7 +241,7 @@ static int zs_transmit_drain(struct zs_port *zport, int irq)
        struct zs_scc *scc = zport->scc;
        int loops = 10000;
 
-       while (!(read_zsreg(zport, R0) & Tx_BUF_EMP) && loops--) {
+       while (!(read_zsreg(zport, R0) & Tx_BUF_EMP) && --loops) {
                zs_spin_unlock_cond_irq(&scc->zlock, irq);
                udelay(2);
                zs_spin_lock_cond_irq(&scc->zlock, irq);
@@ -254,7 +254,7 @@ static int zs_line_drain(struct zs_port *zport, int irq)
        struct zs_scc *scc = zport->scc;
        int loops = 10000;
 
-       while (!(read_zsreg(zport, R1) & ALL_SNT) && loops--) {
+       while (!(read_zsreg(zport, R1) & ALL_SNT) && --loops) {
                zs_spin_unlock_cond_irq(&scc->zlock, irq);
                udelay(2);
                zs_spin_lock_cond_irq(&scc->zlock, irq);
@@ -602,12 +602,12 @@ static void zs_receive_chars(struct zs_port *zport)
                uart_insert_char(uport, status, Rx_OVR, ch, flag);
        }
 
-       tty_flip_buffer_push(uport->info->port.tty);
+       tty_flip_buffer_push(uport->state->port.tty);
 }
 
 static void zs_raw_transmit_chars(struct zs_port *zport)
 {
-       struct circ_buf *xmit = &zport->port.info->xmit;
+       struct circ_buf *xmit = &zport->port.state->xmit;
 
        /* XON/XOFF chars.  */
        if (zport->port.x_char) {
@@ -686,7 +686,7 @@ static void zs_status_handle(struct zs_port *zport, struct zs_port *zport_a)
                        uport->icount.rng++;
 
                if (delta)
-                       wake_up_interruptible(&uport->info->delta_msr_wait);
+                       wake_up_interruptible(&uport->state->port.delta_msr_wait);
 
                spin_lock(&scc->zlock);
        }