Use the helper function time_is_{before,after}_jiffies() to improve code readability.
Unified · Split
| @@ -57,6 +57,7 @@ · 56 unmodified lines | ||
| 57 | 57 | #include <asm/io.h> |
| 58 | 58 | #include <asm/dma.h> |
| 59 | 59 | #include <linux/uaccess.h> |
| 60 | +#include <linux/jiffies.h> | |
| 60 | 61 | //#include <asm/spinlock.h> |
| 61 | 62 | |
| 62 | 63 | #define DRIVER_MAJOR_VERSION 1 |
| @@ -1968,7 +1969,7 @@ static void lmc_driver_timeout(struct net_device *dev, unsigned int txqueue) · 1905 unmodified lines | ||
| 1968 | 1969 | printk("%s: Xmitter busy|\n", dev->name); |
| 1969 | 1970 | |
| 1970 | 1971 | sc->extra_stats.tx_tbusy_calls++; |
| 1971 | − if (jiffies - dev_trans_start(dev) < TX_TIMEOUT) | |
| 1972 | + if (time_is_before_jiffies(dev_trans_start(dev) + TX_TIMEOUT)) | |
| 1972 | 1973 | goto bug_out; |
| 1973 | 1974 | |
| 1974 | 1975 | /* |