serial: 8250_aspeed_vuart: initialize vuart->port in aspeed_vuart_probe()

Previously this had only been initialized if we hit the throttling path
in aspeed_vuart_handle_irq(); moving it to the probe function is a
slight consistency improvement and avoids redundant reinitialization in
the interrupt handler.  It also serves as preparation for converting the
driver's I/O accesses to use port->port.membase instead of its own
vuart->regs.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Link: https://lore.kernel.org/r/20210510014231.647-3-zev@bewilderbeest.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Zev Weiss 2021-05-09 20:42:30 -05:00 committed by Greg Kroah-Hartman
parent 991a350dff
commit c9805fbf9d

View file

@ -349,11 +349,9 @@ static int aspeed_vuart_handle_irq(struct uart_port *port)
struct aspeed_vuart *vuart = port->private_data; struct aspeed_vuart *vuart = port->private_data;
__aspeed_vuart_set_throttle(up, true); __aspeed_vuart_set_throttle(up, true);
if (!timer_pending(&vuart->unthrottle_timer)) { if (!timer_pending(&vuart->unthrottle_timer))
vuart->port = up;
mod_timer(&vuart->unthrottle_timer, mod_timer(&vuart->unthrottle_timer,
jiffies + unthrottle_timeout); jiffies + unthrottle_timeout);
}
} else { } else {
count = min(space, 256); count = min(space, 256);
@ -511,6 +509,7 @@ static int aspeed_vuart_probe(struct platform_device *pdev)
goto err_clk_disable; goto err_clk_disable;
vuart->line = rc; vuart->line = rc;
vuart->port = serial8250_get_port(vuart->line);
rc = of_parse_phandle_with_fixed_args( rc = of_parse_phandle_with_fixed_args(
np, "aspeed,sirq-polarity-sense", 2, 0, np, "aspeed,sirq-polarity-sense", 2, 0,