drivers: tty: max3100: use setup_timer() helper.
authorAllen Pais <allen.lkml@gmail.com>
Fri, 22 Sep 2017 08:26:46 +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/max3100.c

index ace8264..b6b3453 100644 (file)
@@ -787,9 +787,8 @@ static int max3100_probe(struct spi_device *spi)
                max3100s[i]->poll_time = 1;
        max3100s[i]->max3100_hw_suspend = pdata->max3100_hw_suspend;
        max3100s[i]->minor = i;
-       init_timer(&max3100s[i]->timer);
-       max3100s[i]->timer.function = max3100_timeout;
-       max3100s[i]->timer.data = (unsigned long) max3100s[i];
+       setup_timer(&max3100s[i]->timer, max3100_timeout,
+                   (unsigned long)max3100s[i]);
 
        dev_dbg(&spi->dev, "%s: adding port %d\n", __func__, i);
        max3100s[i]->port.irq = max3100s[i]->irq;