summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorNam Cao <namcao@linutronix.de>2025-02-05 11:45:59 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-02-20 15:38:33 +0100
commit7ba2facc3f91809a5af083ccfb1f1dc79f18b48b (patch)
tree14c5d2b3bcbb38750da0b25e7eebba96955a3a40 /drivers/tty
parentafa51660033c5542612dd0fccdef300aa522cf95 (diff)
downloadlinux-next-7ba2facc3f91809a5af083ccfb1f1dc79f18b48b.tar.gz
linux-next-7ba2facc3f91809a5af083ccfb1f1dc79f18b48b.zip
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 <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/c21664d013015584aebbb6bb8cedd748182cb551.1738746904.git.namcao@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/sh-sci.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index e0ead0147bfe..2db2d85003f7 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -1714,8 +1714,7 @@ static void sci_request_dma(struct uart_port *port)
dma += s->buf_len_rx;
}
- hrtimer_init(&s->rx_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
- s->rx_timer.function = sci_dma_rx_timer_fn;
+ hrtimer_setup(&s->rx_timer, sci_dma_rx_timer_fn, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
s->chan_rx_saved = s->chan_rx = chan;