diff options
author | Allen Pais <allen.lkml@gmail.com> | 2017-09-22 11:26:46 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-10-03 21:28:36 +0300 |
commit | 71fa527290660c5fc6bdc63bcb7de66af4f3895f (patch) | |
tree | 89e49fa3aa650343bf68b735c5f7685f56f1c990 /drivers/tty | |
parent | a386ab2b286476f4e87b974f917ec80cb9b87cab (diff) | |
download | linux-71fa527290660c5fc6bdc63bcb7de66af4f3895f.tar.xz |
drivers: tty: max3100: use setup_timer() helper.
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>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/max3100.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/tty/serial/max3100.c b/drivers/tty/serial/max3100.c index ace82645b123..b6b3453e8c1f 100644 --- a/drivers/tty/serial/max3100.c +++ b/drivers/tty/serial/max3100.c @@ -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; |