From: Marcelo Feitoza Parisi <marcelo@feitoza.com.br>
Subject: [KJ] [PATCH] drivers/net/hp100.c : Use of time_before macro

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

Signed-off-by: Marcelo Feitoza Parisi <marcelo@feitoza.com.br>

---
 hp100.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

Index: quilt/drivers/net/hp100.c
===================================================================
--- quilt.orig/drivers/net/hp100.c
+++ quilt/drivers/net/hp100.c
@@ -116,6 +116,7 @@
 #include <linux/delay.h>
 #include <linux/init.h>
 #include <linux/bitops.h>
+#include <linux/jiffies.h>
 
 #include <asm/io.h>
 
@@ -1500,7 +1501,7 @@ static int hp100_start_xmit_bm(struct sk
 		printk(KERN_DEBUG "hp100: %s: start_xmit_bm: No TX PDL available.\n", dev->name);
 #endif
 		/* not waited long enough since last tx? */
-		if (jiffies - dev->trans_start < HZ)
+		if (time_before(jiffies, dev->trans_start + HZ))
 			return -EAGAIN;
 
 		if (hp100_check_lan(dev))
@@ -1653,7 +1654,7 @@ static int hp100_start_xmit(struct sk_bu
 		printk(KERN_DEBUG "hp100: %s: start_xmit: tx free mem = 0x%x\n", dev->name, i);
 #endif
 		/* not waited long enough since last failed tx try? */
-		if (jiffies - dev->trans_start < HZ) {
+		if (time_before(jiffies, dev->trans_start + HZ)) {
 #ifdef HP100_DEBUG
 			printk(KERN_DEBUG "hp100: %s: trans_start timing problem\n",
 			       dev->name);
