From: Manuel Schölling Date: Thu, 22 May 2014 17:52:45 +0000 (+0200) Subject: micrel: Use time_before_eq() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=05e1e76e0f736cba6094425ba20a3eea6dc23b99;p=linux-beck.git micrel: Use time_before_eq() To be future-proof and for better readability the time comparisons are modified to use time_before_eq() instead of plain, error-prone math. Signed-off-by: Manuel Schölling Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/micrel/ksz884x.c b/drivers/net/ethernet/micrel/ksz884x.c index c3898d3deffb..064a48d0c368 100644 --- a/drivers/net/ethernet/micrel/ksz884x.c +++ b/drivers/net/ethernet/micrel/ksz884x.c @@ -4930,7 +4930,7 @@ static void netdev_tx_timeout(struct net_device *dev) * Only reset the hardware if time between calls is long * enough. */ - if (jiffies - last_reset <= dev->watchdog_timeo) + if (time_before_eq(jiffies, last_reset + dev->watchdog_timeo)) hw_priv = NULL; }