Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1737265 > unrolled thread

[PATCH 02/10] drivers:tty: imx: use setup_timer() helper.

Started byAllen Pais <allen.lkml@gmail.com>
First post2017-09-22 10:30 +0200
Last post2017-09-22 11:10 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 02/10] drivers:tty: imx: use setup_timer() helper. Allen Pais <allen.lkml@gmail.com> - 2017-09-22 10:30 +0200
    Re: [PATCH 02/10] drivers:tty: imx: use setup_timer() helper. Uwe Kleine-König          <u.kleine-koenig@pengutronix.de> - 2017-09-22 11:10 +0200

#1737265 — [PATCH 02/10] drivers:tty: imx: use setup_timer() helper.

FromAllen Pais <allen.lkml@gmail.com>
Date2017-09-22 10:30 +0200
Subject[PATCH 02/10] drivers:tty: imx: use setup_timer() helper.
Message-ID<usrvs-3Q3-17@gated-at.bofh.it>
    Use setup_timer function instead of initializing timer with the
    function and data fields.

Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
 drivers/tty/serial/imx.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index dfeff39..64f57c6 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -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;
+	setup_timer(&sport->timer, imx_timeout, (unsigned long)sport);
 
 	sport->gpios = mctrl_gpio_init(&sport->port, 0);
 	if (IS_ERR(sport->gpios))
-- 
2.7.4

[toc] | [next] | [standalone]


#1737308

FromUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Date2017-09-22 11:10 +0200
Message-ID<uss8b-4hz-41@gated-at.bofh.it>
In reply to#1737265
Hello,

$Subject ~= s/:/: /

On Fri, Sep 22, 2017 at 01:56:44PM +0530, Allen Pais wrote:
>     Use setup_timer function instead of initializing timer with the
>     function and data fields.
> 
> Signed-off-by: Allen Pais <allen.lkml@gmail.com>
> ---
>  drivers/tty/serial/imx.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
> index dfeff39..64f57c6 100644
> --- a/drivers/tty/serial/imx.c
> +++ b/drivers/tty/serial/imx.c
> @@ -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;
> +	setup_timer(&sport->timer, imx_timeout, (unsigned long)sport);

Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Thanks
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web