Skip to content

Commit c158a29

Browse files
covanamKAGA-KOKO
authored andcommitted
mailbox: 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/b742f81b6acdaa604511834a06a8aac3e6e63ca3.1738746904.git.namcao@linutronix.de
1 parent 0ebb5e7 commit c158a29

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/mailbox/mailbox.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -534,9 +534,7 @@ int mbox_controller_register(struct mbox_controller *mbox)
534534
return -EINVAL;
535535
}
536536

537-
hrtimer_init(&mbox->poll_hrt, CLOCK_MONOTONIC,
538-
HRTIMER_MODE_REL);
539-
mbox->poll_hrt.function = txdone_hrtimer;
537+
hrtimer_setup(&mbox->poll_hrt, txdone_hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
540538
spin_lock_init(&mbox->poll_hrt_lock);
541539
}
542540

0 commit comments

Comments
 (0)