diff options
author | 2025-02-05 11:38:57 +0100 | |
---|---|---|
committer | 2025-02-18 10:32:32 +0100 | |
commit | ee13da875b8a4636198538dbe2e8037574e7a98e (patch) | |
tree | 019f4411813e80dc1d77c94dbf634045a45c0e4d /kernel/sched/core.c | |
parent | s390/ap_bus: Switch to use hrtimer_setup() (diff) | |
download | wireguard-linux-ee13da875b8a4636198538dbe2e8037574e7a98e.tar.xz wireguard-linux-ee13da875b8a4636198538dbe2e8037574e7a98e.zip |
sched: Switch to use hrtimer_setup()
hrtimer_setup() takes the callback function pointer as argument and
initializes the timer completely.
Replace hrtimer_init() and the open coded initialization of
hrtimer::function with the new setup mechanism.
Signed-off-by: Nam Cao <namcao@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/a55e849cba3c41b4c5708be6ea6be6f337d1a8fb.1738746821.git.namcao@linutronix.de
Diffstat (limited to 'kernel/sched/core.c')
-rw-r--r-- | kernel/sched/core.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 9aecd914ac69..6469755ea6ad 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -916,8 +916,7 @@ static void hrtick_rq_init(struct rq *rq) #ifdef CONFIG_SMP INIT_CSD(&rq->hrtick_csd, __hrtick_start, rq); #endif - hrtimer_init(&rq->hrtick_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_HARD); - rq->hrtick_timer.function = hrtick; + hrtimer_setup(&rq->hrtick_timer, hrtick, CLOCK_MONOTONIC, HRTIMER_MODE_REL_HARD); } #else /* CONFIG_SCHED_HRTICK */ static inline void hrtick_clear(struct rq *rq) |