aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ns83820.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/ns83820.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/ns83820.c')
-rw-r--r--drivers/net/ns83820.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c
index b0c3b6ab6263..253cf018dfba 100644
--- a/drivers/net/ns83820.c
+++ b/drivers/net/ns83820.c
@@ -116,6 +116,7 @@
116#include <linux/timer.h> 116#include <linux/timer.h>
117#include <linux/if_vlan.h> 117#include <linux/if_vlan.h>
118#include <linux/rtnetlink.h> 118#include <linux/rtnetlink.h>
119#include <linux/jiffies.h>
119 120
120#include <asm/io.h> 121#include <asm/io.h>
121#include <asm/uaccess.h> 122#include <asm/uaccess.h>
@@ -1607,7 +1608,7 @@ static void ns83820_run_bist(struct net_device *ndev, const char *name, u32 enab
1607{ 1608{
1608 struct ns83820 *dev = PRIV(ndev); 1609 struct ns83820 *dev = PRIV(ndev);
1609 int timed_out = 0; 1610 int timed_out = 0;
1610 long start; 1611 unsigned long start;
1611 u32 status; 1612 u32 status;
1612 int loops = 0; 1613 int loops = 0;
1613 1614
@@ -1625,7 +1626,7 @@ static void ns83820_run_bist(struct net_device *ndev, const char *name, u32 enab
1625 break; 1626 break;
1626 if (status & fail) 1627 if (status & fail)
1627 break; 1628 break;
1628 if ((jiffies - start) >= HZ) { 1629 if (time_after_eq(jiffies, start + HZ)) {
1629 timed_out = 1; 1630 timed_out = 1;
1630 break; 1631 break;
1631 } 1632 }