diff options
author | Manuel Schölling <manuel.schoelling@gmx.de> | 2014-05-22 21:10:28 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-05-22 15:50:13 -0400 |
commit | 3aeea53f0a372a8adbfc150b37319bff3d24fd04 (patch) | |
tree | 1aa3221d025d3da4af1ce79f87c3673b4d7a02a9 /drivers/net/ethernet/xilinx/xilinx_emaclite.c | |
parent | 05e1e76e0f736cba6094425ba20a3eea6dc23b99 (diff) | |
download | op-kernel-dev-3aeea53f0a372a8adbfc150b37319bff3d24fd04.zip op-kernel-dev-3aeea53f0a372a8adbfc150b37319bff3d24fd04.tar.gz |
xilinx: 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/xilinx/xilinx_emaclite.c')
-rw-r--r-- | drivers/net/ethernet/xilinx/xilinx_emaclite.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c index 0d87c67..8c4aed3 100644 --- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c +++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c @@ -702,7 +702,7 @@ static int xemaclite_mdio_wait(struct net_local *lp) */ while (__raw_readl(lp->base_addr + XEL_MDIOCTRL_OFFSET) & XEL_MDIOCTRL_MDIOSTS_MASK) { - if (end - jiffies <= 0) { + if (time_before_eq(end, jiffies)) { WARN_ON(1); return -ETIMEDOUT; } |