Use of the time_before() macro, defined at linux/jiffies.h, which deal with wrapping correctly and are nicer to read. Signed-off-by: Marcelo Feitoza Parisi --- linux/drivers/net/hamradio/dmascc.c 2005-06-17 16:48:29.000000000 -0300 +++ linux-kj/drivers/net/hamradio/dmascc.c 2005-07-16 03:52:00.470502312 -0300 @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -405,7 +406,7 @@ udelay(2000000 / TMR_0_HZ); /* Timing loop */ - while (jiffies - time < 13) { + while (time_before(jiffies, time + 13)) { for (i = 0; i < hw[h].num_devs; i++) if (base[i] && counting[i]) { /* Read back Timer 1: latch; read LSB; read MSB */ @@ -548,7 +549,7 @@ /* Wait and detect IRQ */ time = jiffies; - while (jiffies - time < 2 + HZ / TMR_0_HZ); + while (time_before(jiffies, time + 2 + HZ / TMR_0_HZ)); irq = probe_irq_off(irqs); /* Clear pending interrupt, disable interrupts */ @@ -1395,7 +1396,8 @@ /* Switch state */ write_scc(priv, R15, 0); if (priv->tx_count && - (jiffies - priv->tx_start) < priv->param.txtimeout) { + time_before(jiffies, priv->tx_start + + priv->param.txtimeout)) { priv->state = TX_PAUSE; start_timer(priv, priv->param.txpause, 0); } else {