mwifiex: use time_after()
authorManuel Schölling <manuel.schoelling@gmx.de>
Sun, 25 May 2014 17:59:36 +0000 (19:59 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 29 May 2014 17:08:11 +0000 (13:08 -0400)
To be future-proof and for better readability the time comparisons are
modified to use time_after() instead of plain, error-prone math.

Signed-off-by: Manuel Schölling <manuel.schoelling@gmx.de>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwifiex/main.h

index 3f25feb1508ef52fc704b3779988a1dbb6d4304e..1398afa8406401c9fd3898716b0849a22946cd42 100644 (file)
@@ -1099,7 +1099,7 @@ mwifiex_11h_get_csa_closed_channel(struct mwifiex_private *priv)
                return 0;
 
        /* Clear csa channel, if DFS channel move time has passed */
-       if (jiffies > priv->csa_expire_time) {
+       if (time_after(jiffies, priv->csa_expire_time)) {
                priv->csa_chan = 0;
                priv->csa_expire_time = 0;
        }