mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 18:13:41 +02:00
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
This commit is contained in:
parent
1a2ff5c305
commit
58ac3c9330
|
|
@ -65,8 +65,7 @@ msm_fence_context_alloc(struct drm_device *dev, volatile uint32_t *fenceptr,
|
|||
fctx->completed_fence = fctx->last_fence;
|
||||
*fctx->fenceptr = fctx->last_fence;
|
||||
|
||||
hrtimer_init(&fctx->deadline_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
|
||||
fctx->deadline_timer.function = deadline_timer;
|
||||
hrtimer_setup(&fctx->deadline_timer, deadline_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
|
||||
|
||||
kthread_init_work(&fctx->deadline_work, deadline_work);
|
||||
|
||||
|
|
|
|||
|
|
@ -135,8 +135,7 @@ void msm_hrtimer_work_init(struct msm_hrtimer_work *work,
|
|||
clockid_t clock_id,
|
||||
enum hrtimer_mode mode)
|
||||
{
|
||||
hrtimer_init(&work->timer, clock_id, mode);
|
||||
work->timer.function = msm_hrtimer_worktimer;
|
||||
hrtimer_setup(&work->timer, msm_hrtimer_worktimer, clock_id, mode);
|
||||
work->worker = worker;
|
||||
kthread_init_work(&work->work, fn);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user