diff options
Diffstat (limited to 'drivers/tty/vcc.c')
-rw-r--r-- | drivers/tty/vcc.c | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/drivers/tty/vcc.c b/drivers/tty/vcc.c index ef01d24858cd..58b454c34560 100644 --- a/drivers/tty/vcc.c +++ b/drivers/tty/vcc.c | |||
@@ -361,17 +361,13 @@ done: | |||
361 | return rv; | 361 | return rv; |
362 | } | 362 | } |
363 | 363 | ||
364 | static void vcc_rx_timer(unsigned long index) | 364 | static void vcc_rx_timer(struct timer_list *t) |
365 | { | 365 | { |
366 | struct vcc_port *port = from_timer(port, t, rx_timer); | ||
366 | struct vio_driver_state *vio; | 367 | struct vio_driver_state *vio; |
367 | struct vcc_port *port; | ||
368 | unsigned long flags; | 368 | unsigned long flags; |
369 | int rv; | 369 | int rv; |
370 | 370 | ||
371 | port = vcc_get_ne(index); | ||
372 | if (!port) | ||
373 | return; | ||
374 | |||
375 | spin_lock_irqsave(&port->lock, flags); | 371 | spin_lock_irqsave(&port->lock, flags); |
376 | port->rx_timer.expires = 0; | 372 | port->rx_timer.expires = 0; |
377 | 373 | ||
@@ -391,18 +387,14 @@ done: | |||
391 | vcc_put(port, false); | 387 | vcc_put(port, false); |
392 | } | 388 | } |
393 | 389 | ||
394 | static void vcc_tx_timer(unsigned long index) | 390 | static void vcc_tx_timer(struct timer_list *t) |
395 | { | 391 | { |
396 | struct vcc_port *port; | 392 | struct vcc_port *port = from_timer(port, t, tx_timer); |
397 | struct vio_vcc *pkt; | 393 | struct vio_vcc *pkt; |
398 | unsigned long flags; | 394 | unsigned long flags; |
399 | int tosend = 0; | 395 | int tosend = 0; |
400 | int rv; | 396 | int rv; |
401 | 397 | ||
402 | port = vcc_get_ne(index); | ||
403 | if (!port) | ||
404 | return; | ||
405 | |||
406 | spin_lock_irqsave(&port->lock, flags); | 398 | spin_lock_irqsave(&port->lock, flags); |
407 | port->tx_timer.expires = 0; | 399 | port->tx_timer.expires = 0; |
408 | 400 | ||
@@ -645,13 +637,8 @@ static int vcc_probe(struct vio_dev *vdev, const struct vio_device_id *id) | |||
645 | if (rv) | 637 | if (rv) |
646 | goto free_domain; | 638 | goto free_domain; |
647 | 639 | ||
648 | init_timer(&port->rx_timer); | 640 | timer_setup(&port->rx_timer, vcc_rx_timer, 0); |
649 | port->rx_timer.function = vcc_rx_timer; | 641 | timer_setup(&port->tx_timer, vcc_tx_timer, 0); |
650 | port->rx_timer.data = port->index; | ||
651 | |||
652 | init_timer(&port->tx_timer); | ||
653 | port->tx_timer.function = vcc_tx_timer; | ||
654 | port->tx_timer.data = port->index; | ||
655 | 642 | ||
656 | dev_set_drvdata(&vdev->dev, port); | 643 | dev_set_drvdata(&vdev->dev, port); |
657 | 644 | ||