Skip to content

Commit c6be6ea

Browse files
covanamKAGA-KOKO
authored andcommitted
stm class: heartbeat: 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]> Link: https://lore.kernel.org/all/c822671342e6ca0437b25f8e24935f09821e389f.1738746904.git.namcao@linutronix.de
1 parent f1061c1 commit c6be6ea

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/hwtracing/stm/heartbeat.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,8 @@ static int stm_heartbeat_init(void)
8181
stm_heartbeat[i].data.type = STM_USER;
8282
stm_heartbeat[i].data.link = stm_heartbeat_link;
8383
stm_heartbeat[i].data.unlink = stm_heartbeat_unlink;
84-
hrtimer_init(&stm_heartbeat[i].hrtimer, CLOCK_MONOTONIC,
85-
HRTIMER_MODE_ABS);
86-
stm_heartbeat[i].hrtimer.function =
87-
stm_heartbeat_hrtimer_handler;
84+
hrtimer_setup(&stm_heartbeat[i].hrtimer, stm_heartbeat_hrtimer_handler,
85+
CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
8886

8987
ret = stm_source_register_device(NULL, &stm_heartbeat[i].data);
9088
if (ret)

0 commit comments

Comments
 (0)