Skip to contentSkip to conversation

hid: use time_after_eq() instead of jiffies judgment

PATCH New Qing Wang 1 participant 1 message Feb 10, 2022

Subsystems (2)
lore
Share & tools
lore

Qing Wang

author
#0 lore raw

PATCH 1/1 hid: use time_after_eq() instead of jiffies judgment

From: Wang Qing <[email protected]>

It is better to use time_xxx() directly instead of jiffies judgment for understanding.

---
 drivers/hid/intel-ish-hid/ipc/ipc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/intel-ish-hid/ipc/ipc.c +1 -1
index 8ccb246..15e1423
@@ -578,7 +578,7 @@ static void _ish_sync_fw_clock(struct ishtp_device *dev)
 	static unsigned long	prev_sync;
 	uint64_t	usec;
 
-	if (prev_sync && jiffies - prev_sync < 20 * HZ)
+	if (prev_sync && time_before(jiffies, prev_sync + 20 * HZ))
 		return;
 
 	prev_sync = jiffies;
Signature · 1 line
2.7.4