Skip to content

Commit 397c07a

Browse files
covanamKAGA-KOKO
authored andcommitted
drm/xe/oa: 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: Lucas De Marchi <[email protected]> Acked-by: Zack Rusin <[email protected]> Link: https://lore.kernel.org/all/08238e193b1f63ae7d5d607fa975420735a869a5.1738746904.git.namcao@linutronix.de
1 parent c38e753 commit 397c07a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/xe/xe_oa.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1766,8 +1766,8 @@ static int xe_oa_stream_init(struct xe_oa_stream *stream,
17661766

17671767
WRITE_ONCE(u->exclusive_stream, stream);
17681768

1769-
hrtimer_init(&stream->poll_check_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
1770-
stream->poll_check_timer.function = xe_oa_poll_check_timer_cb;
1769+
hrtimer_setup(&stream->poll_check_timer, xe_oa_poll_check_timer_cb, CLOCK_MONOTONIC,
1770+
HRTIMER_MODE_REL);
17711771
init_waitqueue_head(&stream->poll_wq);
17721772

17731773
spin_lock_init(&stream->oa_buffer.ptr_lock);

0 commit comments

Comments
 (0)