summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNam Cao <namcao@linutronix.de>2025-02-05 11:55:11 +0100
committerIngo Molnar <mingo@kernel.org>2025-04-05 10:30:17 +0200
commit50177a8b2ec756a03f635444538da928dc5ac488 (patch)
tree235e4aa60da9c0097b4f82b1d06cfb34c6c284e9
parent9779489a31d77a7b9cb6f20d2d2caced4e29dbe6 (diff)
downloadlinux-50177a8b2ec756a03f635444538da928dc5ac488.tar.gz
linux-50177a8b2ec756a03f635444538da928dc5ac488.tar.bz2
linux-50177a8b2ec756a03f635444538da928dc5ac488.zip
hrtimers: Switch to use __htimer_setup()
__hrtimer_init_sleeper() calls __hrtimer_init() and also sets up the callback function. But there is already __hrtimer_setup() which does both actions. Switch to use __hrtimer_setup() to simplify the code. Signed-off-by: Nam Cao <namcao@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/all/d9a45a51b6a8aa0045310d63f73753bf6b33f385.1738746927.git.namcao@linutronix.de
-rw-r--r--kernel/time/hrtimer.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index b7555ba7033a..2d2835cf2659 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -2061,8 +2061,7 @@ static void __hrtimer_init_sleeper(struct hrtimer_sleeper *sl,
mode |= HRTIMER_MODE_HARD;
}
- __hrtimer_init(&sl->timer, clock_id, mode);
- sl->timer.function = hrtimer_wakeup;
+ __hrtimer_setup(&sl->timer, hrtimer_wakeup, clock_id, mode);
sl->task = current;
}