diff options
author | Kees Cook <keescook@chromium.org> | 2017-10-16 19:27:37 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-10-20 08:06:46 -0400 |
commit | f0f62c67dd53ce0ed26ad2940be1dfff5c3d7bd9 (patch) | |
tree | 00b23cec0a6d776e95c471da3bcd138f7963c051 | |
parent | 54ff200e66f837da9b0b24570a02d95d67d1d42f (diff) |
serial: m32r_sio: Convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to
all timer callbacks, switch to using the new timer_setup() and from_timer()
to pass the timer pointer explicitly.
Cc: Jiri Slaby <jslaby@suse.com>
Cc: linux-serial@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/tty/serial/m32r_sio.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/tty/serial/m32r_sio.c b/drivers/tty/serial/m32r_sio.c index 5b3bd9511993..5f4003ad32b6 100644 --- a/drivers/tty/serial/m32r_sio.c +++ b/drivers/tty/serial/m32r_sio.c | |||
@@ -511,9 +511,9 @@ static void serial_unlink_irq_chain(struct uart_sio_port *up) | |||
511 | /* | 511 | /* |
512 | * This function is used to handle ports that do not have an interrupt. | 512 | * This function is used to handle ports that do not have an interrupt. |
513 | */ | 513 | */ |
514 | static void m32r_sio_timeout(unsigned long data) | 514 | static void m32r_sio_timeout(struct timer_list *t) |
515 | { | 515 | { |
516 | struct uart_sio_port *up = (struct uart_sio_port *)data; | 516 | struct uart_sio_port *up = from_timer(up, t, timer); |
517 | unsigned int timeout; | 517 | unsigned int timeout; |
518 | unsigned int sts; | 518 | unsigned int sts; |
519 | 519 | ||
@@ -907,8 +907,7 @@ static void __init m32r_sio_register_ports(struct uart_driver *drv) | |||
907 | 907 | ||
908 | up->port.line = i; | 908 | up->port.line = i; |
909 | up->port.ops = &m32r_sio_pops; | 909 | up->port.ops = &m32r_sio_pops; |
910 | init_timer(&up->timer); | 910 | timer_setup(&up->timer, m32r_sio_timeout, 0); |
911 | up->timer.function = m32r_sio_timeout; | ||
912 | 911 | ||
913 | uart_add_one_port(drv, &up->port); | 912 | uart_add_one_port(drv, &up->port); |
914 | } | 913 | } |