mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 12:21:22 -05:00
ntb: ntb_pingpong: 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: Zack Rusin <zack.rusin@broadcom.com> Link: https://lore.kernel.org/all/2b179e16ab830611fdcb09a33a5a531c9800679b.1738746904.git.namcao@linutronix.de
This commit is contained in:
@@ -284,8 +284,7 @@ static struct pp_ctx *pp_create_data(struct ntb_dev *ntb)
|
||||
pp->ntb = ntb;
|
||||
atomic_set(&pp->count, 0);
|
||||
spin_lock_init(&pp->lock);
|
||||
hrtimer_init(&pp->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
pp->timer.function = pp_timer_func;
|
||||
hrtimer_setup(&pp->timer, pp_timer_func, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
|
||||
return pp;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user