summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/8390/ax88796.c
diff options
context:
space:
mode:
authorManuel Schölling <manuel.schoelling@gmx.de>2014-05-18 12:45:48 +0200
committerDavid S. Miller <davem@davemloft.net>2014-05-18 21:24:52 -0400
commit03b8dcba1e6ea636a96d80f7adbf03d748d517ad (patch)
treed8ac038995c21cfbe68c72e798ddaaed379cf29e /drivers/net/ethernet/8390/ax88796.c
parentda26a625bfa8d12b789f12a107a2e389c236c362 (diff)
downloadlwn-03b8dcba1e6ea636a96d80f7adbf03d748d517ad.tar.gz
lwn-03b8dcba1e6ea636a96d80f7adbf03d748d517ad.zip
net: 8390: use time_after() for time comparison
To be future-proof and for better readability the time comparisons are modified to use time_after() instead of raw math. Signed-off-by: Manuel Schölling <manuel.schoelling@gmx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/8390/ax88796.c')
-rw-r--r--drivers/net/ethernet/8390/ax88796.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/8390/ax88796.c b/drivers/net/ethernet/8390/ax88796.c
index 455d4c399b52..1d162ccb4733 100644
--- a/drivers/net/ethernet/8390/ax88796.c
+++ b/drivers/net/ethernet/8390/ax88796.c
@@ -157,7 +157,7 @@ static void ax_reset_8390(struct net_device *dev)
/* This check _should_not_ be necessary, omit eventually. */
while ((ei_inb(addr + EN0_ISR) & ENISR_RESET) == 0) {
- if (jiffies - reset_start_time > 2 * HZ / 100) {
+ if (time_after(jiffies, reset_start_time + 2 * HZ / 100)) {
netdev_warn(dev, "%s: did not complete.\n", __func__);
break;
}
@@ -293,7 +293,7 @@ static void ax_block_output(struct net_device *dev, int count,
dma_start = jiffies;
while ((ei_inb(nic_base + EN0_ISR) & ENISR_RDC) == 0) {
- if (jiffies - dma_start > 2 * HZ / 100) { /* 20ms */
+ if (time_after(jiffies, dma_start + 2 * HZ / 100)) { /* 20ms */
netdev_warn(dev, "timeout waiting for Tx RDC.\n");
ax_reset_8390(dev);
ax_NS8390_init(dev, 1);