From: Marcelo Feitoza Parisi <[EMAIL PROTECTED]>

Use of time_after() macro, defined at linux/jiffies.h, which deal with
wrapping correctly and are nicer to read.


Signed-off-by: Marcelo Feitoza Parisi <[EMAIL PROTECTED]>
Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>

---
 etherh.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

Index: quilt/drivers/net/arm/etherh.c
===================================================================
--- quilt.orig/drivers/net/arm/etherh.c
+++ quilt/drivers/net/arm/etherh.c
@@ -46,6 +46,7 @@
 #include <linux/device.h>
 #include <linux/init.h>
 #include <linux/bitops.h>
+#include <linux/jiffies.h>
 
 #include <asm/system.h>
 #include <asm/ecard.h>
@@ -356,7 +357,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);

--
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to