Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/msm: 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 <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/2689e1ad4105f415ce8cd9e426873d9ac479dc36.1738746904.git.namcao@linutronix.de

authored by

Nam Cao and committed by
Thomas Gleixner
58ac3c93 1a2ff5c3

+2 -4
+1 -2
drivers/gpu/drm/msm/msm_fence.c
··· 65 65 fctx->completed_fence = fctx->last_fence; 66 66 *fctx->fenceptr = fctx->last_fence; 67 67 68 - hrtimer_init(&fctx->deadline_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS); 69 - fctx->deadline_timer.function = deadline_timer; 68 + hrtimer_setup(&fctx->deadline_timer, deadline_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS); 70 69 71 70 kthread_init_work(&fctx->deadline_work, deadline_work); 72 71
+1 -2
drivers/gpu/drm/msm/msm_io_utils.c
··· 135 135 clockid_t clock_id, 136 136 enum hrtimer_mode mode) 137 137 { 138 - hrtimer_init(&work->timer, clock_id, mode); 139 - work->timer.function = msm_hrtimer_worktimer; 138 + hrtimer_setup(&work->timer, msm_hrtimer_worktimer, clock_id, mode); 140 139 work->worker = worker; 141 140 kthread_init_work(&work->work, fn); 142 141 }