Skip to content

Commit 7358f05

Browse files
covanamKAGA-KOKO
authored andcommitted
drm/i915/perf: 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/b712673a02c7132ea85eff57b0e7e59f6d5d0da0.1738746904.git.namcao@linutronix.de
1 parent 9892287 commit 7358f05

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/gpu/drm/i915/i915_perf.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3359,9 +3359,8 @@ static int i915_oa_stream_init(struct i915_perf_stream *stream,
33593359
"opening stream oa config uuid=%s\n",
33603360
stream->oa_config->uuid);
33613361

3362-
hrtimer_init(&stream->poll_check_timer,
3363-
CLOCK_MONOTONIC, HRTIMER_MODE_REL);
3364-
stream->poll_check_timer.function = oa_poll_check_timer_cb;
3362+
hrtimer_setup(&stream->poll_check_timer, oa_poll_check_timer_cb, CLOCK_MONOTONIC,
3363+
HRTIMER_MODE_REL);
33653364
init_waitqueue_head(&stream->poll_wq);
33663365
spin_lock_init(&stream->oa_buffer.ptr_lock);
33673366
mutex_init(&stream->lock);

0 commit comments

Comments
 (0)