提交 4c19e2f2 编写于 作者: K Karim Eshapa 提交者: David S. Miller

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: NKarim Eshapa <karim.eshapa@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 f92ceb01
......@@ -131,7 +131,7 @@ static inline int edc_inc(struct edc *edc, u16 max_err, u16 timeframe)
unsigned long now;
now = jiffies;
if (now - edc->timestart > timeframe) {
if (time_after(now, edc->timestart + timeframe)) {
edc->errorcount = 1;
edc->timestart = now;
} else if (++edc->errorcount > max_err) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册