HID: intel-ish-hid: ipc: use time_before to replace "jiffies < a"

time_before deals with timer wrapping correctly.

Signed-off-by: Li Qiong <liqiong@nfschina.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
Li Qiong 2022-06-06 21:47:50 +08:00 committed by Jiri Kosina
parent 6431fd0151
commit 15b2815602
1 changed files with 1 additions and 1 deletions

View File

@ -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;