Skip to content

Commit 50177a8

Browse files
covanamIngo Molnar
authored andcommitted
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
1 parent 9779489 commit 50177a8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

kernel/time/hrtimer.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2061,8 +2061,7 @@ static void __hrtimer_init_sleeper(struct hrtimer_sleeper *sl,
20612061
mode |= HRTIMER_MODE_HARD;
20622062
}
20632063

2064-
__hrtimer_init(&sl->timer, clock_id, mode);
2065-
sl->timer.function = hrtimer_wakeup;
2064+
__hrtimer_setup(&sl->timer, hrtimer_wakeup, clock_id, mode);
20662065
sl->task = current;
20672066
}
20682067

0 commit comments

Comments
 (0)