]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
drivers: tty: vcc: use setup_timer() helper.
authorAllen Pais <allen.lkml@gmail.com>
Fri, 22 Sep 2017 08:26:45 +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/vcc.c

index ef01d24858cd659b9d667c964536fe6798bde6bb..954b190526e78e0396f8a69c178a7f0abd25b130 100644 (file)
@@ -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);