X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fnet%2Fns83820.c;h=253cf018dfbacff0308444b91ddb7e371f12b230;hb=ff5688ae1cedfb175b5ed0f319d03ad2e5ee005d;hp=f857ae94d261ab505dd809499c372878c0d79e93;hpb=3133c5e896c0b2509e72ae0c2cb9452c80d47f46;p=linux-2.6 diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c index f857ae94d2..253cf018df 100644 --- a/drivers/net/ns83820.c +++ b/drivers/net/ns83820.c @@ -115,6 +115,8 @@ #include #include #include +#include +#include #include #include @@ -1606,7 +1608,7 @@ static void ns83820_run_bist(struct net_device *ndev, const char *name, u32 enab { struct ns83820 *dev = PRIV(ndev); int timed_out = 0; - long start; + unsigned long start; u32 status; int loops = 0; @@ -1624,7 +1626,7 @@ static void ns83820_run_bist(struct net_device *ndev, const char *name, u32 enab break; if (status & fail) break; - if ((jiffies - start) >= HZ) { + if (time_after_eq(jiffies, start + HZ)) { timed_out = 1; break; }