diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/serial/sb1250-duart.c | 6 | ||||
-rw-r--r-- | drivers/serial/sunhv.c | 2 | ||||
-rw-r--r-- | drivers/serial/zs.c | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/drivers/serial/sb1250-duart.c b/drivers/serial/sb1250-duart.c index a4fb343a08da..319e8b83f6be 100644 --- a/drivers/serial/sb1250-duart.c +++ b/drivers/serial/sb1250-duart.c | |||
@@ -204,7 +204,7 @@ static int sbd_receive_drain(struct sbd_port *sport) | |||
204 | { | 204 | { |
205 | int loops = 10000; | 205 | int loops = 10000; |
206 | 206 | ||
207 | while (sbd_receive_ready(sport) && loops--) | 207 | while (sbd_receive_ready(sport) && --loops) |
208 | read_sbdchn(sport, R_DUART_RX_HOLD); | 208 | read_sbdchn(sport, R_DUART_RX_HOLD); |
209 | return loops; | 209 | return loops; |
210 | } | 210 | } |
@@ -218,7 +218,7 @@ static int __maybe_unused sbd_transmit_drain(struct sbd_port *sport) | |||
218 | { | 218 | { |
219 | int loops = 10000; | 219 | int loops = 10000; |
220 | 220 | ||
221 | while (!sbd_transmit_ready(sport) && loops--) | 221 | while (!sbd_transmit_ready(sport) && --loops) |
222 | udelay(2); | 222 | udelay(2); |
223 | return loops; | 223 | return loops; |
224 | } | 224 | } |
@@ -232,7 +232,7 @@ static int sbd_line_drain(struct sbd_port *sport) | |||
232 | { | 232 | { |
233 | int loops = 10000; | 233 | int loops = 10000; |
234 | 234 | ||
235 | while (!sbd_transmit_empty(sport) && loops--) | 235 | while (!sbd_transmit_empty(sport) && --loops) |
236 | udelay(2); | 236 | udelay(2); |
237 | return loops; | 237 | return loops; |
238 | } | 238 | } |
diff --git a/drivers/serial/sunhv.c b/drivers/serial/sunhv.c index a94a2ab4b571..1df5325faab2 100644 --- a/drivers/serial/sunhv.c +++ b/drivers/serial/sunhv.c | |||
@@ -461,7 +461,7 @@ static void sunhv_console_write_paged(struct console *con, const char *s, unsign | |||
461 | break; | 461 | break; |
462 | udelay(1); | 462 | udelay(1); |
463 | } | 463 | } |
464 | if (limit <= 0) | 464 | if (limit < 0) |
465 | break; | 465 | break; |
466 | page_bytes -= written; | 466 | page_bytes -= written; |
467 | ra += written; | 467 | ra += written; |
diff --git a/drivers/serial/zs.c b/drivers/serial/zs.c index 9e6a873f8203..d8c2809b1ab6 100644 --- a/drivers/serial/zs.c +++ b/drivers/serial/zs.c | |||
@@ -231,7 +231,7 @@ static int zs_receive_drain(struct zs_port *zport) | |||
231 | { | 231 | { |
232 | int loops = 10000; | 232 | int loops = 10000; |
233 | 233 | ||
234 | while ((read_zsreg(zport, R0) & Rx_CH_AV) && loops--) | 234 | while ((read_zsreg(zport, R0) & Rx_CH_AV) && --loops) |
235 | read_zsdata(zport); | 235 | read_zsdata(zport); |
236 | return loops; | 236 | return loops; |
237 | } | 237 | } |
@@ -241,7 +241,7 @@ static int zs_transmit_drain(struct zs_port *zport, int irq) | |||
241 | struct zs_scc *scc = zport->scc; | 241 | struct zs_scc *scc = zport->scc; |
242 | int loops = 10000; | 242 | int loops = 10000; |
243 | 243 | ||
244 | while (!(read_zsreg(zport, R0) & Tx_BUF_EMP) && loops--) { | 244 | while (!(read_zsreg(zport, R0) & Tx_BUF_EMP) && --loops) { |
245 | zs_spin_unlock_cond_irq(&scc->zlock, irq); | 245 | zs_spin_unlock_cond_irq(&scc->zlock, irq); |
246 | udelay(2); | 246 | udelay(2); |
247 | zs_spin_lock_cond_irq(&scc->zlock, irq); | 247 | zs_spin_lock_cond_irq(&scc->zlock, irq); |
@@ -254,7 +254,7 @@ static int zs_line_drain(struct zs_port *zport, int irq) | |||
254 | struct zs_scc *scc = zport->scc; | 254 | struct zs_scc *scc = zport->scc; |
255 | int loops = 10000; | 255 | int loops = 10000; |
256 | 256 | ||
257 | while (!(read_zsreg(zport, R1) & ALL_SNT) && loops--) { | 257 | while (!(read_zsreg(zport, R1) & ALL_SNT) && --loops) { |
258 | zs_spin_unlock_cond_irq(&scc->zlock, irq); | 258 | zs_spin_unlock_cond_irq(&scc->zlock, irq); |
259 | udelay(2); | 259 | udelay(2); |
260 | zs_spin_lock_cond_irq(&scc->zlock, irq); | 260 | zs_spin_lock_cond_irq(&scc->zlock, irq); |