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

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 <zack.rusin@broadcom.com>
Signed-off-by: Nam Cao <namcao@linutronix.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/4a028a23126b3350a5e243dcb49e1ef1b2a4b740.1738746904.git.namcao@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Nam Cao and committed by
Greg Kroah-Hartman
d2fa8e52 7ba2facc

+2 -2
+2 -2
drivers/tty/serial/xilinx_uartps.c
··· 1626 1626 writel(val, port->membase + CDNS_UART_MODEMCR); 1627 1627 1628 1628 /* 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); 1631 1631 1632 1632 /* Disable transmitter and make Rx setup*/ 1633 1633 cdns_uart_stop_tx(port);