aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorNam Cao <namcao@linutronix.de>2025-02-05 11:46:29 +0100
committerThomas Gleixner <tglx@linutronix.de>2025-02-18 11:19:07 +0100
commit7b5edfd278b04bd158c14554dd494ec00aa9e275 (patch)
treec29704e1fc6e40c90776072f97ee829be3878578
parentdrm/vmwgfx: Switch to use hrtimer_setup() (diff)
downloadwireguard-linux-7b5edfd278b04bd158c14554dd494ec00aa9e275.tar.xz
wireguard-linux-7b5edfd278b04bd158c14554dd494ec00aa9e275.zip
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
-rw-r--r--drivers/virtio/virtio_mem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/virtio/virtio_mem.c b/drivers/virtio/virtio_mem.c
index 8a294b9cbcf6..56d0dbe62163 100644
--- a/drivers/virtio/virtio_mem.c
+++ b/drivers/virtio/virtio_mem.c
@@ -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();