diff options
author | Gujulan Elango, Hari Prasath (H.) <hgujulan@visteon.com> | 2015-05-08 14:04:43 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-05-10 16:00:41 +0300 |
commit | e32e1928146662d1cb7c4dc4385dcdcb0357340e (patch) | |
tree | 890d188cb3079683bdcba9c6b801e728d6dfe81b | |
parent | b68cecbedd5a66112b06ca22dce1ea06473b37b9 (diff) | |
download | linux-e32e1928146662d1cb7c4dc4385dcdcb0357340e.tar.xz |
staging: rtl8192e: use time_before() macro
This patch replaces the condition check for time elapsed with a
simplified time_before() macro
Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/rtl8192e/rtl8192e/rtl_ps.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c b/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c index 840dda962f90..386ae0c5f253 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c @@ -100,7 +100,8 @@ void rtl8192_hw_to_sleep(struct net_device *dev, u64 time) time -= msecs_to_jiffies(8 + 16 + 7); - if ((time - jiffies) <= msecs_to_jiffies(MIN_SLEEP_TIME)) { + timeout = jiffies + msecs_to_jiffies(MIN_SLEEP_TIME); + if (time_before((unsigned long)time,timeout)) { spin_unlock_irqrestore(&priv->ps_lock, flags); netdev_info(dev, "too short to sleep::%lld < %ld\n", time - jiffies, msecs_to_jiffies(MIN_SLEEP_TIME)); |