tty: serial: altera_uart_{r,t}x_chars() need only uart_port
Both altera_uart_{r,t}x_chars() need only uart_port, not altera_uart. So pass the former from altera_uart_interrupt() directly. Apart it maybe saves a dereference, this makes the transition of altera_uart_tx_chars() easier to follow in the next patch. Cc: Tobias Klauser <tklauser@distanz.ch> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Acked-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Jiri Slaby <jslaby@suse.cz> Link: https://lore.kernel.org/r/20220920052049.20507-4-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
d9c128117d
commit
3af44d9bb0
|
@ -199,9 +199,8 @@ static void altera_uart_set_termios(struct uart_port *port,
|
|||
*/
|
||||
}
|
||||
|
||||
static void altera_uart_rx_chars(struct altera_uart *pp)
|
||||
static void altera_uart_rx_chars(struct uart_port *port)
|
||||
{
|
||||
struct uart_port *port = &pp->port;
|
||||
unsigned char ch, flag;
|
||||
unsigned short status;
|
||||
|
||||
|
@ -246,9 +245,8 @@ static void altera_uart_rx_chars(struct altera_uart *pp)
|
|||
tty_flip_buffer_push(&port->state->port);
|
||||
}
|
||||
|
||||
static void altera_uart_tx_chars(struct altera_uart *pp)
|
||||
static void altera_uart_tx_chars(struct uart_port *port)
|
||||
{
|
||||
struct uart_port *port = &pp->port;
|
||||
struct circ_buf *xmit = &port->state->xmit;
|
||||
|
||||
if (port->x_char) {
|
||||
|
@ -286,9 +284,9 @@ static irqreturn_t altera_uart_interrupt(int irq, void *data)
|
|||
|
||||
spin_lock(&port->lock);
|
||||
if (isr & ALTERA_UART_STATUS_RRDY_MSK)
|
||||
altera_uart_rx_chars(pp);
|
||||
altera_uart_rx_chars(port);
|
||||
if (isr & ALTERA_UART_STATUS_TRDY_MSK)
|
||||
altera_uart_tx_chars(pp);
|
||||
altera_uart_tx_chars(port);
|
||||
spin_unlock(&port->lock);
|
||||
|
||||
return IRQ_RETVAL(isr);
|
||||
|
|
Loading…
Reference in New Issue