Skip to content

Commit afa5166

Browse files
covanamgregkh
authored andcommitted
serial: imx: 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. Acked-by: Zack Rusin <[email protected]> Signed-off-by: Nam Cao <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Link: https://lore.kernel.org/r/ad27070bc67c13f8a9acbd5cbf4cbae72797e3e1.1738746904.git.namcao@linutronix.de Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 8cb4418 commit afa5166

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/tty/serial/imx.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2582,10 +2582,10 @@ static int imx_uart_probe(struct platform_device *pdev)
25822582
imx_uart_writel(sport, ucr3, UCR3);
25832583
}
25842584

2585-
hrtimer_init(&sport->trigger_start_tx, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
2586-
hrtimer_init(&sport->trigger_stop_tx, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
2587-
sport->trigger_start_tx.function = imx_trigger_start_tx;
2588-
sport->trigger_stop_tx.function = imx_trigger_stop_tx;
2585+
hrtimer_setup(&sport->trigger_start_tx, imx_trigger_start_tx, CLOCK_MONOTONIC,
2586+
HRTIMER_MODE_REL);
2587+
hrtimer_setup(&sport->trigger_stop_tx, imx_trigger_stop_tx, CLOCK_MONOTONIC,
2588+
HRTIMER_MODE_REL);
25892589

25902590
/*
25912591
* Allocate the IRQ(s) i.MX1 has three interrupts whereas later

0 commit comments

Comments
 (0)