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:
parent
6431fd0151
commit
15b2815602
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue