]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
micrel: Use time_before_eq()
authorManuel Schölling <manuel.schoelling@gmx.de>
Thu, 22 May 2014 17:52:45 +0000 (19:52 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 May 2014 19:50:12 +0000 (15:50 -0400)
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 <manuel.schoelling@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/micrel/ksz884x.c

index c3898d3deffb7d42bbbbd52bdf56986da37ab905..064a48d0c368a267826e2f77bacb2da9fa366e1e 100644 (file)
@@ -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;
        }