diff options
author | Li Qiong <liqiong@nfschina.com> | 2022-06-06 21:47:50 +0800 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2022-06-08 13:05:45 +0200 |
commit | 15b28156029465e594b462e6dad459a737028697 (patch) | |
tree | b5e24ccf716c54953c7c2b7eb83ecfeefae6e75c /drivers/hid | |
parent | 6431fd0151eca63d4c62c4e6bcc1913b5e26d028 (diff) | |
download | linux-15b28156029465e594b462e6dad459a737028697.tar.bz2 |
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>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/intel-ish-hid/ipc/ipc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/intel-ish-hid/ipc/ipc.c b/drivers/hid/intel-ish-hid/ipc/ipc.c index 8ccb246b0114..15e14239af82 100644 --- a/drivers/hid/intel-ish-hid/ipc/ipc.c +++ b/drivers/hid/intel-ish-hid/ipc/ipc.c @@ -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; |