From: Karim Eshapa Date: Tue, 9 May 2017 00:06:50 +0000 (+0200) Subject: drivers: net: wimax: i2400m: i2400m-usb: Use time_after for time comparison X-Git-Tag: MMI-PSA29.97-13-9~5632^2~3 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4c19e2f2a86f2281014c1e06785715ad9864c9cc;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/wimax/i2400m/i2400m-usb.h b/drivers/net/wimax/i2400m/i2400m-usb.h index 649ecad6844c..eff4f464a23e 100644 --- a/drivers/net/wimax/i2400m/i2400m-usb.h +++ b/drivers/net/wimax/i2400m/i2400m-usb.h @@ -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) {