提交 f0f62c67 编写于 作者: K Kees Cook 提交者: Greg Kroah-Hartman

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: NKees Cook <keescook@chromium.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 54ff200e
......@@ -511,9 +511,9 @@ static void serial_unlink_irq_chain(struct uart_sio_port *up)
/*
* This function is used to handle ports that do not have an interrupt.
*/
static void m32r_sio_timeout(unsigned long data)
static void m32r_sio_timeout(struct timer_list *t)
{
struct uart_sio_port *up = (struct uart_sio_port *)data;
struct uart_sio_port *up = from_timer(up, t, timer);
unsigned int timeout;
unsigned int sts;
......@@ -907,8 +907,7 @@ static void __init m32r_sio_register_ports(struct uart_driver *drv)
up->port.line = i;
up->port.ops = &m32r_sio_pops;
init_timer(&up->timer);
up->timer.function = m32r_sio_timeout;
timer_setup(&up->timer, m32r_sio_timeout, 0);
uart_add_one_port(drv, &up->port);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册