Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1737261
| From | Allen Pais <allen.lkml@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 03/10] drivers: tty: vcc: use setup_timer() helper. |
| Date | 2017-09-22 10:30 +0200 |
| Message-ID | <usrvs-3Q3-7@gated-at.bofh.it> (permalink) |
| References | <usrvs-3Q3-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Use setup_timer function instead of initializing timer with the
function and data fields.
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
drivers/tty/vcc.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/tty/vcc.c b/drivers/tty/vcc.c
index ef01d24..954b190 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);
--
2.7.4
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 03/10] drivers: tty: vcc: use setup_timer() helper. Allen Pais <allen.lkml@gmail.com> - 2017-09-22 10:30 +0200
csiph-web