mirror of
https://github.com/torvalds/linux.git
synced 2026-05-22 06:01:53 +02:00
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>
This commit is contained in:
parent
61c4fb9c4d
commit
b7eb7f67eb
|
|
@ -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;
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user