diff options
| author | Nam Cao <[email protected]> | 2025-02-05 10:46:24 +0000 |
|---|---|---|
| committer | Thomas Gleixner <[email protected]> | 2025-02-18 10:19:06 +0000 |
| commit | 1a2ff5c3058d3811b092736cbbd3ae09ea308dd2 (patch) | |
| tree | c9012ec21e2b758ec50d69fa0abec6eefa11eee7 | |
| parent | drm/i915/uncore: Switch to use hrtimer_setup() (diff) | |
| download | kernel-1a2ff5c3058d3811b092736cbbd3ae09ea308dd2.tar.gz kernel-1a2ff5c3058d3811b092736cbbd3ae09ea308dd2.zip | |
drm/i915/request: 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]>
Acked-by: Jani Nikula <[email protected]>
Link: https://lore.kernel.org/all/4fe658e6d8483e44d4fff579bc426e627487f6ca.1738746904.git.namcao@linutronix.de
| -rw-r--r-- | drivers/gpu/drm/i915/i915_request.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c index 8f62cfa23fb7..ea0b8e7e4828 100644 --- a/drivers/gpu/drm/i915/i915_request.c +++ b/drivers/gpu/drm/i915/i915_request.c @@ -293,8 +293,7 @@ static void __rq_init_watchdog(struct i915_request *rq) { struct i915_request_watchdog *wdg = &rq->watchdog; - hrtimer_init(&wdg->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - wdg->timer.function = __rq_watchdog_expired; + hrtimer_setup(&wdg->timer, __rq_watchdog_expired, CLOCK_MONOTONIC, HRTIMER_MODE_REL); } static void __rq_arm_watchdog(struct i915_request *rq) |
