Commit 4851d3aa authored by Marcelo Feitoza Parisi's avatar Marcelo Feitoza Parisi Committed by David S. Miller

[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: default avatarMarcelo Feitoza Parisi <marcelo@feitoza.com.br>
Signed-off-by: default avatarDomen Puncer <domen@coderock.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a8178345
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment