summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2018-04-26 08:50:55 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-14 13:51:11 +0200
commita451debb4173bfe3b06d2ac926c4903eadc236d4 (patch)
treebfcb89febfe9a73b9d2ca3b5ad9a1b2631cd9050 /drivers/tty
parent8afb1d2c12163f77777f84616a8e9444d0050ebe (diff)
downloadlinux-a451debb4173bfe3b06d2ac926c4903eadc236d4.tar.bz2
serial/aspeed-vuart: fix a couple mod_timer() calls
The "unthrottle_timeout" is HZ/10 but mod_timer() takes a the actual jiffie where you want it to timeout, not an offset. Fixes: 5909c0bf9c7a ("serial/aspeed-vuart: Implement quick throttle mechanism") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/8250/8250_aspeed_vuart.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/tty/serial/8250/8250_aspeed_vuart.c b/drivers/tty/serial/8250/8250_aspeed_vuart.c
index 023db3266757..435bec40dee6 100644
--- a/drivers/tty/serial/8250/8250_aspeed_vuart.c
+++ b/drivers/tty/serial/8250/8250_aspeed_vuart.c
@@ -226,7 +226,8 @@ static void aspeed_vuart_unthrottle_exp(struct timer_list *timer)
struct uart_8250_port *up = vuart->port;
if (!tty_buffer_space_avail(&up->port.state->port)) {
- mod_timer(&vuart->unthrottle_timer, unthrottle_timeout);
+ mod_timer(&vuart->unthrottle_timer,
+ jiffies + unthrottle_timeout);
return;
}
@@ -271,7 +272,7 @@ static int aspeed_vuart_handle_irq(struct uart_port *port)
if (!timer_pending(&vuart->unthrottle_timer)) {
vuart->port = up;
mod_timer(&vuart->unthrottle_timer,
- unthrottle_timeout);
+ jiffies + unthrottle_timeout);
}
} else {