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


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 <marcelo@feitoza.com.br>

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

Index: quilt/drivers/net/seeq8005.c
===================================================================
--- quilt.orig/drivers/net/seeq8005.c
+++ quilt/drivers/net/seeq8005.c
@@ -699,7 +699,7 @@ static void hardware_send_packet(struct 
 	int ioaddr = dev->base_addr;
 	int status = inw(SEEQ_STATUS);
 	int transmit_ptr = 0;
-	int tmp;
+	unsigned long tmp;
 
 	if (net_debug>4) {
 		printk("%s: send 0x%04x\n",dev->name,length);
@@ -724,7 +724,8 @@ static void hardware_send_packet(struct 
 	
 	/* drain FIFO */
 	tmp = jiffies;
-	while ( (((status=inw(SEEQ_STATUS)) & SEEQSTAT_FIFO_EMPTY) == 0) && (jiffies - tmp < HZ))
+	while ( (((status=inw(SEEQ_STATUS)) & SEEQSTAT_FIFO_EMPTY) == 0)
+			&& time_before(jiffies, tmp + HZ))
 		mb();
 	
 	/* doit ! */
