From 32ba8093a8fe877807e7e4cf25c7f85ce6828f6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig=20=28The=20Capable=20Hub=29?= Date: Fri, 14 Aug 2026 11:19:28 +0200 Subject: [PATCH] serial: txx9: Drop usage of uart_match_port() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Where the uart_match_port() function is used it's known that .iotype is UPIO_PORT. So uart_match_port() is equivalent to comparing .iobase. Remove the call to uart_match_port() which then only has a single caller that is handled in the next commit. Signed-off-by: Uwe Kleine-König (The Capable Hub) Reviewed-by: Geert Uytterhoeven Reviewed-by: Atsushi Nemoto Link: https://patch.msgid.link/b9287ba4b13b32a11765c0532db5d34843227373.1786697789.git.u.kleine-koenig@baylibre.com Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/serial_txx9.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/serial_txx9.c b/drivers/tty/serial/serial_txx9.c index ef56979321b9..5b574ed276b2 100644 --- a/drivers/tty/serial/serial_txx9.c +++ b/drivers/tty/serial/serial_txx9.c @@ -965,7 +965,12 @@ static int serial_txx9_register_port(struct uart_port *port) mutex_lock(&serial_txx9_mutex); for (i = 0; i < UART_NR; i++) { uart = &serial_txx9_ports[i]; - if (uart_match_port(uart, port)) { + /* + * serial_txx9_register_port() is only called from + * pciserial_txx9_init_one(). So .iotype is UPIO_PORT and + * comparing .iobase serves to distinguish ports. + */ + if (uart->iobase == port->iobase) { uart_remove_one_port(&serial_txx9_reg, uart); break; }