[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1644481834-14677-1-git-send-email-wangqing@vivo.com>
Date: Thu, 10 Feb 2022 00:30:34 -0800
From: Qing Wang <wangqing@...o.com>
To: Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
Jiri Kosina <jikos@...nel.org>,
Benjamin Tissoires <benjamin.tissoires@...hat.com>,
linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Wang Qing <wangqing@...o.com>
Subject: [PATCH] hid: use time_after_eq() instead of jiffies judgment
From: Wang Qing <wangqing@...o.com>
It is better to use time_xxx() directly instead of jiffies judgment
for understanding.
Signed-off-by: Wang Qing <wangqing@...o.com>
---
drivers/hid/intel-ish-hid/ipc/ipc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/intel-ish-hid/ipc/ipc.c b/drivers/hid/intel-ish-hid/ipc/ipc.c
index 8ccb246..15e1423
--- 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;
--
2.7.4
Powered by blists - more mailing lists