Skip to content

Commit c38e753

Browse files
covanamKAGA-KOKO
authored andcommitted
drm/vkms: 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. Patch was created by using Coccinelle. 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/866841803c850c38819f98fdf6bd992ee4a4d012.1738746904.git.namcao@linutronix.de
1 parent 58ac3c9 commit c38e753

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/vkms/vkms_crtc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ static int vkms_enable_vblank(struct drm_crtc *crtc)
6464
struct drm_vblank_crtc *vblank = drm_crtc_vblank_crtc(crtc);
6565
struct vkms_output *out = drm_crtc_to_vkms_output(crtc);
6666

67-
hrtimer_init(&out->vblank_hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
68-
out->vblank_hrtimer.function = &vkms_vblank_simulate;
67+
hrtimer_setup(&out->vblank_hrtimer, &vkms_vblank_simulate, CLOCK_MONOTONIC,
68+
HRTIMER_MODE_REL);
6969
out->period_ns = ktime_set(0, vblank->framedur_ns);
7070
hrtimer_start(&out->vblank_hrtimer, out->period_ns, HRTIMER_MODE_REL);
7171

0 commit comments

Comments
 (0)