Skip to content

Commit ff533f7

Browse files
covanamKAGA-KOKO
authored andcommitted
drm/vmwgfx: 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/6f6664cf2fea2f782e37f64a77fc9f8699794f58.1738746904.git.namcao@linutronix.de
1 parent 397c07a commit ff533f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/vmwgfx/vmwgfx_vkms.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,8 @@ vmw_vkms_enable_vblank(struct drm_crtc *crtc)
290290

291291
drm_calc_timestamping_constants(crtc, &crtc->mode);
292292

293-
hrtimer_init(&du->vkms.timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
294-
du->vkms.timer.function = &vmw_vkms_vblank_simulate;
293+
hrtimer_setup(&du->vkms.timer, &vmw_vkms_vblank_simulate, CLOCK_MONOTONIC,
294+
HRTIMER_MODE_REL);
295295
du->vkms.period_ns = ktime_set(0, vblank->framedur_ns);
296296
hrtimer_start(&du->vkms.timer, du->vkms.period_ns, HRTIMER_MODE_REL);
297297

0 commit comments

Comments
 (0)