]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drivers: tty: ifx6x60: use setup_timer() helper.
authorAllen Pais <allen.lkml@gmail.com>
Fri, 22 Sep 2017 08:26:52 +0000 (13:56 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Oct 2017 18:28:36 +0000 (20:28 +0200)
        Use setup_timer function instead of initializing timer with the
        function and data fields.

Signed-off-by: Allen Pais <allen.lkml@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/ifx6x60.c

index f190a84a02465668d64f3b6a57d6462588d781ad..596b738ec122b91ead9afb23bf61aa979c5e15d5 100644 (file)
@@ -1029,9 +1029,8 @@ static int ifx_spi_spi_probe(struct spi_device *spi)
        spin_lock_init(&ifx_dev->write_lock);
        spin_lock_init(&ifx_dev->power_lock);
        ifx_dev->power_status = 0;
-       init_timer(&ifx_dev->spi_timer);
-       ifx_dev->spi_timer.function = ifx_spi_timeout;
-       ifx_dev->spi_timer.data = (unsigned long)ifx_dev;
+       setup_timer(&ifx_dev->spi_timer, ifx_spi_timeout,
+                   (unsigned long)ifx_dev);
        ifx_dev->modem = pl_data->modem_type;
        ifx_dev->use_dma = pl_data->use_dma;
        ifx_dev->max_hz = pl_data->max_hz;