Skip to content

Commit 9779489

Browse files
covanamIngo Molnar
authored andcommitted
hrtimers: Delete hrtimer_init()
hrtimer_init() is now unused. Delete it. 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/003722f60c7a2a4f8d4ed24fb741aa313b7e5136.1738746927.git.namcao@linutronix.de
1 parent 48ad7bb commit 9779489

File tree

3 files changed

+1
-23
lines changed

3 files changed

+1
-23
lines changed

include/linux/hrtimer.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,6 @@ static inline enum hrtimer_restart hrtimer_dummy_timeout(struct hrtimer *unused)
231231
/* Exported timer functions: */
232232

233233
/* Initialize timers: */
234-
extern void hrtimer_init(struct hrtimer *timer, clockid_t which_clock,
235-
enum hrtimer_mode mode);
236234
extern void hrtimer_setup(struct hrtimer *timer, enum hrtimer_restart (*function)(struct hrtimer *),
237235
clockid_t clock_id, enum hrtimer_mode mode);
238236
extern void hrtimer_setup_on_stack(struct hrtimer *timer,

include/linux/hrtimer_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ enum hrtimer_restart {
3434
* @is_hard: Set if hrtimer will be expired in hard interrupt context
3535
* even on RT.
3636
*
37-
* The hrtimer structure must be initialized by hrtimer_init()
37+
* The hrtimer structure must be initialized by hrtimer_setup()
3838
*/
3939
struct hrtimer {
4040
struct timerqueue_node node;

kernel/time/hrtimer.c

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1640,26 +1640,6 @@ static void __hrtimer_setup(struct hrtimer *timer,
16401640
timer->function = function;
16411641
}
16421642

1643-
/**
1644-
* hrtimer_init - initialize a timer to the given clock
1645-
* @timer: the timer to be initialized
1646-
* @clock_id: the clock to be used
1647-
* @mode: The modes which are relevant for initialization:
1648-
* HRTIMER_MODE_ABS, HRTIMER_MODE_REL, HRTIMER_MODE_ABS_SOFT,
1649-
* HRTIMER_MODE_REL_SOFT
1650-
*
1651-
* The PINNED variants of the above can be handed in,
1652-
* but the PINNED bit is ignored as pinning happens
1653-
* when the hrtimer is started
1654-
*/
1655-
void hrtimer_init(struct hrtimer *timer, clockid_t clock_id,
1656-
enum hrtimer_mode mode)
1657-
{
1658-
debug_init(timer, clock_id, mode);
1659-
__hrtimer_init(timer, clock_id, mode);
1660-
}
1661-
EXPORT_SYMBOL_GPL(hrtimer_init);
1662-
16631643
/**
16641644
* hrtimer_setup - initialize a timer to the given clock
16651645
* @timer: the timer to be initialized

0 commit comments

Comments
 (0)