Skip to content

Commit d2fa8e5

Browse files
covanamgregkh
authored andcommitted
serial: xilinx_uartps: 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/4a028a23126b3350a5e243dcb49e1ef1b2a4b740.1738746904.git.namcao@linutronix.de Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 7ba2fac commit d2fa8e5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/tty/serial/xilinx_uartps.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1626,8 +1626,8 @@ static int cdns_rs485_config(struct uart_port *port, struct ktermios *termios,
16261626
writel(val, port->membase + CDNS_UART_MODEMCR);
16271627

16281628
/* Timer setup */
1629-
hrtimer_init(&cdns_uart->tx_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
1630-
cdns_uart->tx_timer.function = &cdns_rs485_tx_callback;
1629+
hrtimer_setup(&cdns_uart->tx_timer, &cdns_rs485_tx_callback, CLOCK_MONOTONIC,
1630+
HRTIMER_MODE_REL);
16311631

16321632
/* Disable transmitter and make Rx setup*/
16331633
cdns_uart_stop_tx(port);

0 commit comments

Comments
 (0)