summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMarcelo Feitoza Parisi <marcelo@feitoza.com.br>2005-07-15 10:00:41 -0700
committerDavid S. Miller <davem@davemloft.net>2005-07-15 10:00:41 -0700
commit4851d3aaa550b7b62553dd19fcadc7b586da4f17 (patch)
tree0135b52b20a168053a25abd0649d4b9fa521873a /drivers
parenta8178345c4f12f4413e5620fc86a6b0381c41bc9 (diff)
downloadlinux-3.10-4851d3aaa550b7b62553dd19fcadc7b586da4f17.tar.gz
linux-3.10-4851d3aaa550b7b62553dd19fcadc7b586da4f17.tar.bz2
linux-3.10-4851d3aaa550b7b62553dd19fcadc7b586da4f17.zip
[NET PCMCIA]: drivers/net/pcmcia/smc91c92_cs.c : Use of time_after macro
From: Marcelo Feitoza Parisi <marcelo@feitoza.com.br> Use of the time_after() macro, defined at linux/jiffies.h, which deal with wrapping correctly and are nicer to read. Signed-off-by: Marcelo Feitoza Parisi <marcelo@feitoza.com.br> Signed-off-by: Domen Puncer <domen@coderock.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/pcmcia/smc91c92_cs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c
index fbc2f58ff68..0d8bb4cccbb 100644
--- a/drivers/net/pcmcia/smc91c92_cs.c
+++ b/drivers/net/pcmcia/smc91c92_cs.c
@@ -41,6 +41,7 @@
#include <linux/ioport.h>
#include <linux/ethtool.h>
#include <linux/mii.h>
+#include <linux/jiffies.h>
#include <pcmcia/cs_types.h>
#include <pcmcia/cs.h>
@@ -2092,7 +2093,7 @@ static void media_check(u_long arg)
}
/* Ignore collisions unless we've had no rx's recently */
- if (jiffies - dev->last_rx > HZ) {
+ if (time_after(jiffies, dev->last_rx + HZ)) {
if (smc->tx_err || (smc->media_status & EPH_16COL))
media |= EPH_16COL;
}