]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/vmwgfx: Switch to use hrtimer_setup()
authorNam Cao <namcao@linutronix.de>
Wed, 5 Feb 2025 10:46:28 +0000 (11:46 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 18 Feb 2025 10:19:07 +0000 (11:19 +0100)
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/6f6664cf2fea2f782e37f64a77fc9f8699794f58.1738746904.git.namcao@linutronix.de
drivers/gpu/drm/vmwgfx/vmwgfx_vkms.c

index 8651b788e98bc41f9dbba4d68f56e734defdf76e..aec774fa4d7bf61c7dbda784d7f347814e6b9402 100644 (file)
@@ -290,8 +290,8 @@ vmw_vkms_enable_vblank(struct drm_crtc *crtc)
 
        drm_calc_timestamping_constants(crtc, &crtc->mode);
 
-       hrtimer_init(&du->vkms.timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
-       du->vkms.timer.function = &vmw_vkms_vblank_simulate;
+       hrtimer_setup(&du->vkms.timer, &vmw_vkms_vblank_simulate, CLOCK_MONOTONIC,
+                     HRTIMER_MODE_REL);
        du->vkms.period_ns = ktime_set(0, vblank->framedur_ns);
        hrtimer_start(&du->vkms.timer, du->vkms.period_ns, HRTIMER_MODE_REL);