diff options
author | Wang Qing <wangqing@vivo.com> | 2022-02-27 19:13:48 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-02-28 13:21:31 +0000 |
commit | b7eb7f67eb293ec2cb8d3bde73b3173ae4273708 (patch) | |
tree | 1d52611bfd63448f0396cb32b498916b3ff4e7a2 /drivers/net/wan | |
parent | 61c4fb9c4d09dfb6f33690169560862d5d0e42f7 (diff) |
net: wan: lmc: use time_is_before_jiffies() instead of open coding it
Use the helper function time_is_{before,after}_jiffies() to improve
code readability.
Signed-off-by: Wang Qing <wangqing@vivo.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wan')
-rw-r--r-- | drivers/net/wan/lmc/lmc_main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wan/lmc/lmc_main.c b/drivers/net/wan/lmc/lmc_main.c index 6a142dc85c37..76c6b4f89890 100644 --- a/drivers/net/wan/lmc/lmc_main.c +++ b/drivers/net/wan/lmc/lmc_main.c @@ -57,6 +57,7 @@ #include <asm/io.h> #include <asm/dma.h> #include <linux/uaccess.h> +#include <linux/jiffies.h> //#include <asm/spinlock.h> #define DRIVER_MAJOR_VERSION 1 @@ -1968,7 +1969,7 @@ static void lmc_driver_timeout(struct net_device *dev, unsigned int txqueue) printk("%s: Xmitter busy|\n", dev->name); sc->extra_stats.tx_tbusy_calls++; - if (jiffies - dev_trans_start(dev) < TX_TIMEOUT) + if (time_is_before_jiffies(dev_trans_start(dev) + TX_TIMEOUT)) goto bug_out; /* |