mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
tracing/osnoise: 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. Patch was created by using Coccinelle. Signed-off-by: Nam Cao <namcao@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org> Link: https://lore.kernel.org/all/ff8e6e11df5f928b2b97619ac847b4fa045376a1.1738746821.git.namcao@linutronix.de
This commit is contained in:
parent
d2254b0643
commit
19fec9c443
1 changed files with 2 additions and 4 deletions
|
@ -1901,8 +1901,7 @@ static int timerlat_main(void *data)
|
|||
tlat->count = 0;
|
||||
tlat->tracing_thread = false;
|
||||
|
||||
hrtimer_init(&tlat->timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_PINNED_HARD);
|
||||
tlat->timer.function = timerlat_irq;
|
||||
hrtimer_setup(&tlat->timer, timerlat_irq, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_PINNED_HARD);
|
||||
tlat->kthread = current;
|
||||
osn_var->pid = current->pid;
|
||||
/*
|
||||
|
@ -2456,8 +2455,7 @@ static int timerlat_fd_open(struct inode *inode, struct file *file)
|
|||
tlat = this_cpu_tmr_var();
|
||||
tlat->count = 0;
|
||||
|
||||
hrtimer_init(&tlat->timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_PINNED_HARD);
|
||||
tlat->timer.function = timerlat_irq;
|
||||
hrtimer_setup(&tlat->timer, timerlat_irq, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_PINNED_HARD);
|
||||
|
||||
migrate_enable();
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue