[PATCH] seeq8005: use time_before() macro 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/seeq8005.c =================================================================== --- linux-kj.orig/drivers/net/seeq8005.c +++ linux-kj/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 ! */