Skip to content

Commit 7ba2fac

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

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/tty/serial/sh-sci.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1714,8 +1714,7 @@ static void sci_request_dma(struct uart_port *port)
17141714
dma += s->buf_len_rx;
17151715
}
17161716

1717-
hrtimer_init(&s->rx_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
1718-
s->rx_timer.function = sci_dma_rx_timer_fn;
1717+
hrtimer_setup(&s->rx_timer, sci_dma_rx_timer_fn, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
17191718

17201719
s->chan_rx_saved = s->chan_rx = chan;
17211720

0 commit comments

Comments
 (0)