]> Pileus Git - ~andy/linux/blobdiff - drivers/serial/zs.c
tracing/kprobes: Add probe handler dispatcher to support perf and ftrace concurrent use
[~andy/linux] / drivers / serial / zs.c
index 9e6a873f8203ec83f7965fe2711a026089c476fa..d8c2809b1ab616b7fc7209577218d6017fe6cea8 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);