From: Asaf Vertz Date: Mon, 15 Dec 2014 07:22:07 +0000 (+0200) Subject: usb: host: max3421-hcd: use time_after() X-Git-Tag: firefly_0821_release~176^2~2323^2~71 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=788bfe88d552b89842b028ca78e5451a1e64b21b;p=firefly-linux-kernel-4.4.55.git usb: host: max3421-hcd: use time_after() To be future-proof and for better readability the time comparisons are modified to use time_after() instead of plain, error-prone math. Signed-off-by: Asaf Vertz Acked-by: David Mosberger Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/max3421-hcd.c b/drivers/usb/host/max3421-hcd.c index 6234c75da33f..aaaff947d608 100644 --- a/drivers/usb/host/max3421-hcd.c +++ b/drivers/usb/host/max3421-hcd.c @@ -55,6 +55,7 @@ * single thread (max3421_spi_thread). */ +#include #include #include #include @@ -1291,7 +1292,7 @@ max3421_handle_irqs(struct usb_hcd *hcd) char sbuf[16 * 16], *dp, *end; int i; - if (jiffies - last_time > 5*HZ) { + if (time_after(jiffies, last_time + 5*HZ)) { dp = sbuf; end = sbuf + sizeof(sbuf); *dp = '\0';