提交 4851d3aa 编写于 作者: M Marcelo Feitoza Parisi 提交者: 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: NMarcelo Feitoza Parisi <marcelo@feitoza.com.br>
Signed-off-by: NDomen Puncer <domen@coderock.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册