Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <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/c822671342e6ca0437b25f8e24935f09821e389f.1738746904.git.namcao@linutronix.de

authored by

Nam Cao and committed by
Thomas Gleixner
c6be6eaf f1061c14

+2 -4
+2 -4
drivers/hwtracing/stm/heartbeat.c
··· 81 81 stm_heartbeat[i].data.type = STM_USER; 82 82 stm_heartbeat[i].data.link = stm_heartbeat_link; 83 83 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); 88 86 89 87 ret = stm_source_register_device(NULL, &stm_heartbeat[i].data); 90 88 if (ret)