mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-04 16:15:11 +00:00
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:
parent
f92ceb01c2
commit
4c19e2f2a8
1 changed files with 1 additions and 1 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue