aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/seeq8005.c
diff options
context:
space:
mode:
authorMarcelo Feitoza Parisi <marcelo@feitoza.com.br>2006-01-09 21:37:15 -0500
committerJeff Garzik <jgarzik@pobox.com>2006-01-17 07:59:23 -0500
commitff5688ae1cedfb175b5ed0f319d03ad2e5ee005d (patch)
treeeca0d41b3eefc833238591e0100a8136f21269a7 /drivers/net/seeq8005.c
parente03d72b99e4027504ada134bf1804d6ea792b206 (diff)
[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.c5
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[] =
46#include <linux/etherdevice.h> 46#include <linux/etherdevice.h>
47#include <linux/skbuff.h> 47#include <linux/skbuff.h>
48#include <linux/bitops.h> 48#include <linux/bitops.h>
49#include <linux/jiffies.h>
49 50
50#include <asm/system.h> 51#include <asm/system.h>
51#include <asm/io.h> 52#include <asm/io.h>
@@ -699,7 +700,7 @@ static void hardware_send_packet(struct net_device * dev, char *buf, int length)
699 int ioaddr = dev->base_addr; 700 int ioaddr = dev->base_addr;
700 int status = inw(SEEQ_STATUS); 701 int status = inw(SEEQ_STATUS);
701 int transmit_ptr = 0; 702 int transmit_ptr = 0;
702 int tmp; 703 unsigned long tmp;
703 704
704 if (net_debug>4) { 705 if (net_debug>4) {
705 printk("%s: send 0x%04x\n",dev->name,length); 706 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)
724 725
725 /* drain FIFO */ 726 /* drain FIFO */
726 tmp = jiffies; 727 tmp = jiffies;
727 while ( (((status=inw(SEEQ_STATUS)) & SEEQSTAT_FIFO_EMPTY) == 0) && (jiffies - tmp < HZ)) 728 while ( (((status=inw(SEEQ_STATUS)) & SEEQSTAT_FIFO_EMPTY) == 0) && time_before(jiffies, tmp + HZ))
728 mb(); 729 mb();
729 730
730 /* doit ! */ 731 /* doit ! */