Skip to content

Commit

Permalink
[NET PCMCIA]: drivers/net/pcmcia/smc91c92_cs.c : Use of time_after macro
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Marcelo Feitoza Parisi authored and David S. Miller committed Jul 15, 2005
1 parent a817834 commit 4851d3a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/pcmcia/smc91c92_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 4851d3a

Please sign in to comment.