Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e32e1928 authored by Gujulan Elango, Hari Prasath (H.)'s avatar Gujulan Elango, Hari Prasath (H.) Committed by Greg Kroah-Hartman
Browse files

staging: rtl8192e: use time_before() macro



This patch replaces the condition check for time elapsed with a
simplified time_before() macro

Signed-off-by: default avatarHari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b68cecbe
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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));