Skip to content

Commit

Permalink
micrel: Use time_before_eq()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Manuel Schölling authored and David S. Miller committed May 22, 2014
1 parent 87f03cc commit 05e1e76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/micrel/ksz884x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 05e1e76

Please sign in to comment.