diff options
author | Marcelo Feitoza Parisi <marcelo@feitoza.com.br> | 2006-01-10 03:37:15 +0100 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-01-17 13:59:23 +0100 |
commit | ff5688ae1cedfb175b5ed0f319d03ad2e5ee005d (patch) | |
tree | eca0d41b3eefc833238591e0100a8136f21269a7 /drivers/net/seeq8005.c | |
parent | [PATCH] drivers/net/sk98lin/: possible cleanups (diff) | |
download | linux-ff5688ae1cedfb175b5ed0f319d03ad2e5ee005d.tar.xz linux-ff5688ae1cedfb175b5ed0f319d03ad2e5ee005d.zip |
[PATCH] drivers/net/*: use time_after() and friends
They deal with wrapping correctly and are nicer to read. Also make
jiffies-holding variables unsigned long.
Signed-off-by: Marcelo Feitoza Parisi <marcelo@feitoza.com.br>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/seeq8005.c')
-rw-r--r-- | drivers/net/seeq8005.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/seeq8005.c b/drivers/net/seeq8005.c index 79dca398f3ac..bcef03feb2fc 100644 --- a/drivers/net/seeq8005.c +++ b/drivers/net/seeq8005.c @@ -46,6 +46,7 @@ static const char version[] = #include <linux/etherdevice.h> #include <linux/skbuff.h> #include <linux/bitops.h> +#include <linux/jiffies.h> #include <asm/system.h> #include <asm/io.h> @@ -699,7 +700,7 @@ static void hardware_send_packet(struct net_device * dev, char *buf, int length) 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 +725,7 @@ static void hardware_send_packet(struct net_device * dev, char *buf, int length) /* 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 ! */ |