mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 17:01:25 -05:00
virtio: mem: 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. 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/4a911503d16684592b59a16d8ade97e42df64a54.1738746904.git.namcao@linutronix.de
This commit is contained in:
@@ -2950,8 +2950,8 @@ static int virtio_mem_probe(struct virtio_device *vdev)
|
||||
mutex_init(&vm->hotplug_mutex);
|
||||
INIT_LIST_HEAD(&vm->next);
|
||||
spin_lock_init(&vm->removal_lock);
|
||||
hrtimer_init(&vm->retry_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
vm->retry_timer.function = virtio_mem_timer_expired;
|
||||
hrtimer_setup(&vm->retry_timer, virtio_mem_timer_expired, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
vm->retry_timer_ms = VIRTIO_MEM_RETRY_TIMER_MIN_MS;
|
||||
vm->in_kdump = is_kdump_kernel();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user