Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

[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
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;
    }