aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/arm/etherh.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/arm/etherh.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/arm/etherh.c')
-rw-r--r--drivers/net/arm/etherh.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/arm/etherh.c b/drivers/net/arm/etherh.c
index 6a93b666eb7..d52deb8d207 100644
--- a/drivers/net/arm/etherh.c
+++ b/drivers/net/arm/etherh.c
@@ -46,6 +46,7 @@
46#include <linux/device.h> 46#include <linux/device.h>
47#include <linux/init.h> 47#include <linux/init.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/ecard.h> 52#include <asm/ecard.h>
@@ -355,7 +356,7 @@ etherh_block_output (struct net_device *dev, int count, const unsigned char *buf
355 dma_start = jiffies; 356 dma_start = jiffies;
356 357
357 while ((readb (addr + EN0_ISR) & ENISR_RDC) == 0) 358 while ((readb (addr + EN0_ISR) & ENISR_RDC) == 0)
358 if (jiffies - dma_start > 2*HZ/100) { /* 20ms */ 359 if (time_after(jiffies, dma_start + 2*HZ/100)) { /* 20ms */
359 printk(KERN_ERR "%s: timeout waiting for TX RDC\n", 360 printk(KERN_ERR "%s: timeout waiting for TX RDC\n",
360 dev->name); 361 dev->name);
361 etherh_reset (dev); 362 etherh_reset (dev);