On Wed, Oct 25, 2017 at 04:17:55PM +0530, Allen Pais wrote: > Switch to using the new timer_setup() and from_timer() > > Signed-off-by: Allen Pais <allen.pais@xxxxxxxxxx> > --- > drivers/tty/serial/imx.c | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > > diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c > index dfeff39..47194e7 100644 > --- a/drivers/tty/serial/imx.c > +++ b/drivers/tty/serial/imx.c > @@ -941,9 +941,9 @@ static void imx_break_ctl(struct uart_port *port, int break_state) > * This is our per-port timeout handler, for checking the > * modem status signals. > */ > -static void imx_timeout(unsigned long data) > +static void imx_timeout(struct timer_list *t) > { > - struct imx_port *sport = (struct imx_port *)data; > + struct imx_port *sport = from_timer(sport, t, timer); > unsigned long flags; > > if (sport->port.state) { > @@ -2115,9 +2115,7 @@ static int serial_imx_probe(struct platform_device *pdev) > sport->port.rs485.flags = > SER_RS485_RTS_ON_SEND | SER_RS485_RX_DURING_TX; > sport->port.flags = UPF_BOOT_AUTOCONF; > - init_timer(&sport->timer); > - sport->timer.function = imx_timeout; > - sport->timer.data = (unsigned long)sport; > + timer_setup(&sport->timer, imx_timeout, 0); > > sport->gpios = mctrl_gpio_init(&sport->port, 0); > if (IS_ERR(sport->gpios)) Acked-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ | -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html