summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/micrel/ksz884x.c
diff options
context:
space:
mode:
authorManuel Schölling <manuel.schoelling@gmx.de>2014-05-22 19:52:45 +0200
committerDavid S. Miller <davem@davemloft.net>2014-05-22 21:50:12 +0200
commit05e1e76e0f736cba6094425ba20a3eea6dc23b99 (patch)
treeff4e050cc68a06981378d0605c0a7237c49eee58 /drivers/net/ethernet/micrel/ksz884x.c
parentmISDN: Use mod_timer() (diff)
downloadlinux-05e1e76e0f736cba6094425ba20a3eea6dc23b99.tar.xz
linux-05e1e76e0f736cba6094425ba20a3eea6dc23b99.zip
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 <manuel.schoelling@gmx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/micrel/ksz884x.c')
-rw-r--r--drivers/net/ethernet/micrel/ksz884x.c2
1 files changed, 1 insertions, 1 deletions
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;
}