[PATCH] drivers/net/arm/etherh.c: use time_after() From: Marcelo Feitoza Parisi It deals with wrapping correctly and is nicer to read. Signed-off-by: Marcelo Feitoza Parisi Signed-off-by: Alexey Dobriyan Index: linux-kj/drivers/net/arm/etherh.c =================================================================== --- linux-kj.orig/drivers/net/arm/etherh.c 2006-01-18 02:22:26.000000000 +0300 +++ linux-kj/drivers/net/arm/etherh.c 2006-01-18 16:41:05.000000000 +0300 @@ -46,6 +46,7 @@ #include #include #include +#include #include #include @@ -355,7 +356,7 @@ etherh_block_output (struct net_device * dma_start = jiffies; while ((readb (addr + EN0_ISR) & ENISR_RDC) == 0) - if (jiffies - dma_start > 2*HZ/100) { /* 20ms */ + if (time_after(jiffies, dma_start + 2*HZ/100)) { /* 20ms */ printk(KERN_ERR "%s: timeout waiting for TX RDC\n", dev->name); etherh_reset (dev);