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 21:50:13 +0200 |
commit | 3aeea53f0a372a8adbfc150b37319bff3d24fd04 (patch) | |
tree | 1aa3221d025d3da4af1ce79f87c3673b4d7a02a9 /drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c | |
parent | micrel: Use time_before_eq() (diff) | |
download | linux-3aeea53f0a372a8adbfc150b37319bff3d24fd04.tar.xz linux-3aeea53f0a372a8adbfc150b37319bff3d24fd04.zip |
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_axienet_mdio.c')
-rw-r--r-- | drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c b/drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c index 64b4639f43b6..d4abf478e2bb 100644 --- a/drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c @@ -22,7 +22,7 @@ int axienet_mdio_wait_until_ready(struct axienet_local *lp) long end = jiffies + 2; while (!(axienet_ior(lp, XAE_MDIO_MCR_OFFSET) & XAE_MDIO_MCR_READY_MASK)) { - if (end - jiffies <= 0) { + if (time_before_eq(end, jiffies)) { WARN_ON(1); return -ETIMEDOUT; } |