summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/max310x.c
diff options
context:
space:
mode:
authorHugo Villeneuve <hvilleneuve@dimonoff.com>2023-11-22 12:59:56 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-11-25 07:23:16 +0000
commit1be5f0819c1adc8308ecdc248314c5f30c994452 (patch)
tree9bda9e01b678dd9065ac1327f4878104a3db995b /drivers/tty/serial/max310x.c
parentfffa35a25b4ced5ec89b1c12cf6a4f1d9541d3cb (diff)
downloadlinux-stable-1be5f0819c1adc8308ecdc248314c5f30c994452.tar.gz
linux-stable-1be5f0819c1adc8308ecdc248314c5f30c994452.tar.bz2
linux-stable-1be5f0819c1adc8308ecdc248314c5f30c994452.zip
serial: max310x: change confusing comment about Tx FIFO
The comment wording can be confusing, as txlen will return the number of bytes available in the FIFO, which can be less than the maximum theoretical Tx FIFO size. Change the comment so that it is unambiguous. Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com> Link: https://lore.kernel.org/r/20231122175957.3875102-1-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/max310x.c')
-rw-r--r--drivers/tty/serial/max310x.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/max310x.c b/drivers/tty/serial/max310x.c
index 97e4965b73d4..f3a99daebdaa 100644
--- a/drivers/tty/serial/max310x.c
+++ b/drivers/tty/serial/max310x.c
@@ -780,7 +780,7 @@ static void max310x_handle_tx(struct uart_port *port)
to_send = uart_circ_chars_pending(xmit);
until_end = CIRC_CNT_TO_END(xmit->head, xmit->tail, UART_XMIT_SIZE);
if (likely(to_send)) {
- /* Limit to size of TX FIFO */
+ /* Limit to space available in TX FIFO */
txlen = max310x_port_read(port, MAX310X_TXFIFOLVL_REG);
txlen = port->fifosize - txlen;
to_send = (to_send > txlen) ? txlen : to_send;