aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um
diff options
context:
space:
mode:
authorAnton Ivanov <anton.ivanov@cambridgegreys.com>2018-03-05 05:41:42 -0500
committerRichard Weinberger <richard@nod.at>2018-03-29 16:16:34 -0400
commitce471fdbc6173eed5af52df3dca179a509f483d9 (patch)
tree0a6c052cb609586ab4d5a24741028e892f4a6664 /arch/um
parent530ba6c7cb3c22435a4d26de47037bb6f86a5329 (diff)
Migrate vector timers to new timer API
The patches for the UML vector drivers were in-flight when the timer changes happened and were not covered by them. This change migrates vector_kern.c to use the new timer API. Signed-off-by: Anton Ivanov <anton.ivanov@cambridgegreys.com> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um')
-rw-r--r--arch/um/drivers/vector_kern.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/arch/um/drivers/vector_kern.c b/arch/um/drivers/vector_kern.c
index 4daa4fe18ad7..3c764830b93e 100644
--- a/arch/um/drivers/vector_kern.c
+++ b/arch/um/drivers/vector_kern.c
@@ -1233,9 +1233,6 @@ static int vector_net_open(struct net_device *dev)
1233 if ((vp->options & VECTOR_BPF) != 0) 1233 if ((vp->options & VECTOR_BPF) != 0)
1234 vp->bpf = uml_vector_default_bpf(vp->fds->rx_fd, dev->dev_addr); 1234 vp->bpf = uml_vector_default_bpf(vp->fds->rx_fd, dev->dev_addr);
1235 1235
1236 /* Write Timeout Timer */
1237
1238 vp->tl.data = (unsigned long) vp;
1239 netif_start_queue(dev); 1236 netif_start_queue(dev);
1240 1237
1241 /* clear buffer - it can happen that the host side of the interface 1238 /* clear buffer - it can happen that the host side of the interface
@@ -1409,9 +1406,9 @@ static const struct net_device_ops vector_netdev_ops = {
1409}; 1406};
1410 1407
1411 1408
1412static void vector_timer_expire(unsigned long _conn) 1409static void vector_timer_expire(struct timer_list *t)
1413{ 1410{
1414 struct vector_private *vp = (struct vector_private *)_conn; 1411 struct vector_private *vp = from_timer(vp, t, tl);
1415 1412
1416 vp->estats.tx_kicks++; 1413 vp->estats.tx_kicks++;
1417 vector_send(vp->tx_queue); 1414 vector_send(vp->tx_queue);
@@ -1500,9 +1497,8 @@ static void vector_eth_configure(
1500 tasklet_init(&vp->tx_poll, vector_tx_poll, (unsigned long)vp); 1497 tasklet_init(&vp->tx_poll, vector_tx_poll, (unsigned long)vp);
1501 INIT_WORK(&vp->reset_tx, vector_reset_tx); 1498 INIT_WORK(&vp->reset_tx, vector_reset_tx);
1502 1499
1503 init_timer(&vp->tl); 1500 timer_setup(&vp->tl, vector_timer_expire, 0);
1504 spin_lock_init(&vp->lock); 1501 spin_lock_init(&vp->lock);
1505 vp->tl.function = vector_timer_expire;
1506 1502
1507 /* FIXME */ 1503 /* FIXME */
1508 dev->netdev_ops = &vector_netdev_ops; 1504 dev->netdev_ops = &vector_netdev_ops;