This patch replaces the condition check for time elapsed with a simplified time_before() macro Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@xxxxxxxxxxx> --- drivers/staging/rtl8192e/rtl8192e/rtl_ps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c b/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c index 602a189..88233cc 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c @@ -99,7 +99,7 @@ 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)) { + if (time_before(time, jiffies + msecs_to_jiffies(MIN_SLEEP_TIME))) { 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)); -- 1.9.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel