summary refs log tree commit diff
path: root/drivers/tty/vcc.c
diff options
context:
space:
mode:
authorAllen Pais <allen.lkml@gmail.com>2017-09-22 13:56:45 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-03 20:28:36 +0200
commita386ab2b286476f4e87b974f917ec80cb9b87cab (patch)
treea3a3f0e98497e341220cdc2e405fd7af5693417e /drivers/tty/vcc.c
parent22b94d1d99a71e201b28f135b271cb63526f8bd1 (diff)
downloadlinux-a386ab2b286476f4e87b974f917ec80cb9b87cab.tar.gz
drivers: tty: vcc: 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/vcc.c')
-rw-r--r--drivers/tty/vcc.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/tty/vcc.c b/drivers/tty/vcc.c
index ef01d24858cd..954b190526e7 100644
--- a/drivers/tty/vcc.c
+++ b/drivers/tty/vcc.c
@@ -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);