Skip to content

Commit b191fe3

Browse files
Wang Qingbebarino
authored andcommitted
clk: mvebu: use time_is_before_eq_jiffies() instead of open coding it
Use the helper function time_is_{before,after}_jiffies() to improve code readability. Signed-off-by: Wang Qing <wangqing@vivo.com> Link: https://lore.kernel.org/r/1644890154-64915-3-git-send-email-wangqing@vivo.com Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent e783362 commit b191fe3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/clk/mvebu/armada-37xx-periph.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <linux/platform_device.h>
2626
#include <linux/regmap.h>
2727
#include <linux/slab.h>
28+
#include <linux/jiffies.h>
2829

2930
#define TBG_SEL 0x0
3031
#define DIV_SEL0 0x4
@@ -541,7 +542,7 @@ static void clk_pm_cpu_set_rate_wa(struct clk_pm_cpu *pm_cpu,
541542
* We are going to L0 with rate >= 1GHz. Check whether we have been at
542543
* L1 for long enough time. If not, go to L1 for 20ms.
543544
*/
544-
if (pm_cpu->l1_expiration && jiffies >= pm_cpu->l1_expiration)
545+
if (pm_cpu->l1_expiration && time_is_before_eq_jiffies(pm_cpu->l1_expiration))
545546
goto invalidate_l1_exp;
546547

547548
regmap_update_bits(base, ARMADA_37XX_NB_CPU_LOAD,

0 commit comments

Comments
 (0)