Skip to content

Commit

Permalink
drivers: tty: imx: use setup_timer() helper.
Browse files Browse the repository at this point in the history
    Use setup_timer function instead of initializing timer with the
    function and data fields.

Signed-off-by: Allen Pais <allen.lkml@gmail.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Allen Pais authored and Greg Kroah-Hartman committed Oct 3, 2017
1 parent a0983c7 commit 177b508
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/tty/serial/imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -2118,9 +2118,7 @@ static int serial_imx_probe(struct platform_device *pdev)
sport->port.rs485_config = imx_rs485_config;
sport->port.rs485.flags |= SER_RS485_RTS_ON_SEND;
sport->port.flags = UPF_BOOT_AUTOCONF;
init_timer(&sport->timer);
sport->timer.function = imx_timeout;
sport->timer.data = (unsigned long)sport;
setup_timer(&sport->timer, imx_timeout, (unsigned long)sport);

sport->gpios = mctrl_gpio_init(&sport->port, 0);
if (IS_ERR(sport->gpios))
Expand Down

0 comments on commit 177b508

Please sign in to comment.