diff mbox series

[V3,11/13] media: tda8083: use time_is_after_jiffies() instead of open coding it

Message ID 1644890154-64915-12-git-send-email-wangqing@vivo.com (mailing list archive)
State Accepted
Commit 39878a5959547ed3fbf03804b4e929feae334432
Headers show
Series use time_is_{before,after}_jiffies() instead of open coding it | expand

Commit Message

王擎 Feb. 15, 2022, 1:55 a.m. UTC
From: Wang Qing <wangqing@vivo.com>

Use the helper function time_is_{before,after}_jiffies() to improve
code readability.

Signed-off-by: Wang Qing <wangqing@vivo.com>
---
 drivers/media/dvb-frontends/tda8083.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/media/dvb-frontends/tda8083.c b/drivers/media/dvb-frontends/tda8083.c
index 5be11fd..49c4fe1
--- a/drivers/media/dvb-frontends/tda8083.c
+++ b/drivers/media/dvb-frontends/tda8083.c
@@ -162,7 +162,7 @@  static void tda8083_wait_diseqc_fifo (struct tda8083_state* state, int timeout)
 {
 	unsigned long start = jiffies;
 
-	while (jiffies - start < timeout &&
+	while (time_is_after_jiffies(start + timeout) &&
 	       !(tda8083_readreg(state, 0x02) & 0x80))
 	{
 		msleep(50);