From: Wang Qing Date: Tue, 15 Feb 2022 01:55:48 +0000 (-0800) Subject: media: tda8083: use time_is_after_jiffies() instead of open coding it X-Git-Tag: v6.6.17~7948^2~86^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=39878a5959547ed3fbf03804b4e929feae334432;p=platform%2Fkernel%2Flinux-rpi.git media: tda8083: use time_is_after_jiffies() instead of open coding it Use the helper function time_is_{before,after}_jiffies() to improve code readability. Signed-off-by: Wang Qing Signed-off-by: Hans Verkuil --- diff --git a/drivers/media/dvb-frontends/tda8083.c b/drivers/media/dvb-frontends/tda8083.c index 5be11fd..e3e1c3d 100644 --- 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);