Skip to content

Commit 7b5edfd

Browse files
covanamKAGA-KOKO
authored andcommitted
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 <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: Zack Rusin <[email protected]> Link: https://lore.kernel.org/all/4a911503d16684592b59a16d8ade97e42df64a54.1738746904.git.namcao@linutronix.de
1 parent ff533f7 commit 7b5edfd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/virtio/virtio_mem.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2950,8 +2950,8 @@ static int virtio_mem_probe(struct virtio_device *vdev)
29502950
mutex_init(&vm->hotplug_mutex);
29512951
INIT_LIST_HEAD(&vm->next);
29522952
spin_lock_init(&vm->removal_lock);
2953-
hrtimer_init(&vm->retry_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
2954-
vm->retry_timer.function = virtio_mem_timer_expired;
2953+
hrtimer_setup(&vm->retry_timer, virtio_mem_timer_expired, CLOCK_MONOTONIC,
2954+
HRTIMER_MODE_REL);
29552955
vm->retry_timer_ms = VIRTIO_MEM_RETRY_TIMER_MIN_MS;
29562956
vm->in_kdump = is_kdump_kernel();
29572957

0 commit comments

Comments
 (0)