drivers: net: wimax: i2400m: i2400m-usb: Use time_after for time comparison

Use time_after() for time comparison with the new fix.

Signed-off-by: Karim Eshapa <karim.eshapa@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Karim Eshapa 2017-05-09 02:06:50 +02:00 committed by David S. Miller
parent f92ceb01c2
commit 4c19e2f2a8
1 changed files with 1 additions and 1 deletions

View File

@ -131,7 +131,7 @@ static inline int edc_inc(struct edc *edc, u16 max_err, u16 timeframe)
unsigned long now; unsigned long now;
now = jiffies; now = jiffies;
if (now - edc->timestart > timeframe) { if (time_after(now, edc->timestart + timeframe)) {
edc->errorcount = 1; edc->errorcount = 1;
edc->timestart = now; edc->timestart = now;
} else if (++edc->errorcount > max_err) { } else if (++edc->errorcount > max_err) {