[PATCH] drivers/net/*: use time_after() and friends
[firefly-linux-kernel-4.4.55.git] / drivers / net / tokenring / lanstreamer.c
index 97712c3c4e07f4ccfa34b18377e065f781e5726d..c58a4c31d0dda6c7caa5e747c2e49fa4fb2582c2 100644 (file)
 #include <linux/spinlock.h>
 #include <linux/version.h>
 #include <linux/bitops.h>
+#include <linux/jiffies.h>
 
 #include <net/checksum.h>
 
@@ -512,7 +513,7 @@ static int streamer_reset(struct net_device *dev)
 
        while (!((readw(streamer_mmio + SISR)) & SISR_SRB_REPLY)) {
                msleep_interruptible(100);
-               if (jiffies - t > 40 * HZ) {
+               if (time_after(jiffies, t + 40 * HZ)) {
                        printk(KERN_ERR
                               "IBM PCI tokenring card not responding\n");
                        release_region(dev->base_addr, STREAMER_IO_SPACE);