mirror of
https://github.com/torvalds/linux.git
synced 2025-04-09 14:45:27 +00:00
lib: test_objpool: 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> Link: https://lore.kernel.org/all/edc46fbf290b280ebe67bb0d21599c4c30716b68.1738746821.git.namcao@linutronix.de
This commit is contained in:
parent
53867760f5
commit
b09dffdeb3
@ -190,8 +190,7 @@ static int ot_init_hrtimer(struct ot_item *item, unsigned long hrtimer)
|
||||
return -ENOENT;
|
||||
|
||||
item->hrtcycle = ktime_set(0, hrtimer * 1000000UL);
|
||||
hrtimer_init(hrt, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
hrt->function = ot_hrtimer_handler;
|
||||
hrtimer_setup(hrt, ot_hrtimer_handler, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user