Skip to content

Commit

Permalink
drivers: tty: max3100: use setup_timer() helper.
Browse files Browse the repository at this point in the history
    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>
  • Loading branch information
Allen Pais authored and Greg Kroah-Hartman committed Oct 3, 2017
1 parent a386ab2 commit 71fa527
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/tty/serial/max3100.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 71fa527

Please sign in to comment.