diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-14 00:05:31 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-14 00:05:31 -0500 |
commit | fb0255fb2941ef6f21742b2bc146d6b9aef4fedc (patch) | |
tree | 8334f3485152b1c887ddfe04ba9a95c8a704481c /drivers/tty/vcc.c | |
parent | 449fcf3ab0baf3dde9952385e6789f2ca10c3980 (diff) | |
parent | 57f5d648c45c3d40a3257c06629c14fd53c383bc (diff) |
Merge tag 'tty-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull tty/serial updates from Greg KH:
"Here is the big tty/serial driver pull request for 4.15-rc1.
Lots of serial driver updates in here, some small vt cleanups, and a
raft of SPDX and license boilerplate cleanups, messing up the diffstat
a bit.
Nothing major, with no realy functional changes except better hardware
support for some platforms.
All of these have been in linux-next for a while with no reported
issues"
* tag 'tty-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (110 commits)
tty: ehv_bytechan: fix spelling mistake
tty: serial: meson: allow baud-rates lower than 9600
serial: 8250_fintek: Fix crash with baud rate B0
serial: 8250_fintek: Disable delays for ports != 0
serial: 8250_fintek: Return -EINVAL on invalid configuration
tty: Remove redundant license text
tty: serdev: Remove redundant license text
tty: hvc: Remove redundant license text
tty: serial: Remove redundant license text
tty: add SPDX identifiers to all remaining files in drivers/tty/
tty: serial: jsm: remove redundant pointer ts
tty: serial: jsm: add space before the open parenthesis '('
tty: serial: jsm: fix coding style
tty: serial: jsm: delete space between function name and '('
tty: serial: jsm: add blank line after declarations
tty: serial: jsm: change the type of local variable
tty: serial: imx: remove dead code imx_dma_rxint
tty: serial: imx: disable ageing timer interrupt if dma in use
serial: 8250: fix potential deadlock in rs485-mode
serial: m32r_sio: Drop redundant .data assignment
...
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 | ||