From: Marcelo Feitoza Parisi Date: Fri, 15 Jul 2005 17:00:41 +0000 (-0700) Subject: [NET PCMCIA]: drivers/net/pcmcia/smc91c92_cs.c : Use of time_after macro X-Git-Tag: v3.12-rc1~43118^2~35 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4851d3aaa550b7b62553dd19fcadc7b586da4f17;p=kernel%2Fkernel-generic.git [NET PCMCIA]: drivers/net/pcmcia/smc91c92_cs.c : Use of time_after macro From: Marcelo Feitoza Parisi 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 Signed-off-by: Domen Puncer Signed-off-by: David S. Miller --- diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c index fbc2f58..0d8bb4c 100644 --- a/drivers/net/pcmcia/smc91c92_cs.c +++ b/drivers/net/pcmcia/smc91c92_cs.c @@ -41,6 +41,7 @@ #include #include #include +#include #include #include @@ -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; }