Skip to content

Commit

Permalink
drivers: tty: vcc: 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 22b94d1 commit a386ab2
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions drivers/tty/vcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,13 +645,8 @@ static int vcc_probe(struct vio_dev *vdev, const struct vio_device_id *id)
if (rv)
goto free_domain;

init_timer(&port->rx_timer);
port->rx_timer.function = vcc_rx_timer;
port->rx_timer.data = port->index;

init_timer(&port->tx_timer);
port->tx_timer.function = vcc_tx_timer;
port->tx_timer.data = port->index;
setup_timer(&port->rx_timer, vcc_rx_timer, port->index);
setup_timer(&port->tx_timer, vcc_tx_timer, port->index);

dev_set_drvdata(&vdev->dev, port);

Expand Down

0 comments on commit a386ab2

Please sign in to comment.