aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ns83820.c
diff options
context:
space:
mode:
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 f3924fb615b2..0fede50abd3e 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 }