Skip to contentSkip to conversation

serial: 8250: export RSA functions

PATCH New Jiri Slaby (SUSE) 1 participant 1 message Jun 23, 2025 TTY layer and serial drivers

lore
Share & tools
lore

Jiri Slaby (SUSE)

author maintainer
#0 lore raw

PATCH 1/1 serial: 8250: export RSA functions

The RSA functions moved by the below commit to 8250_rsa.c are used in 8250_base.c. Since that can be a module (when CONFIG_SERIAL_8250=m), this causes build failures:
ERROR: modpost: "rsa_autoconfig" [drivers/tty/serial/8250/8250_base.ko] undefined!
ERROR: modpost: "rsa_reset" [drivers/tty/serial/8250/8250_base.ko] undefined!
ERROR: modpost: "rsa_disable" [drivers/tty/serial/8250/8250_base.ko] undefined!
ERROR: modpost: "rsa_enable" [drivers/tty/serial/8250/8250_base.ko] undefined!

Fix them by exporting the functions. But only to the base module using EXPORT_SYMBOL_GPL_FOR_MODULES(). (And not to the whole world.)

Fixes 5a128fb475fb ("serial: 8250: move RSA functions to 8250_rsa.c")
---
 drivers/tty/serial/8250/8250_rsa.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/tty/serial/8250/8250_rsa.c +4 -0
index 2f1ee693103d..ff52ad02f6be 100644
@@ -146,6 +146,7 @@ void rsa_enable(struct uart_8250_port *up)
 	if (up->port.uartclk == SERIAL_RSA_BAUD_BASE * 16)
 		serial_out(up, UART_RSA_FRR, 0);
 }
+EXPORT_SYMBOL_GPL_FOR_MODULES(rsa_enable, "8250_base");
 
 /*
  * Attempts to turn off the RSA FIFO and resets the RSA board back to 115kbps compat mode. It is
@@ -177,6 +178,7 @@ void rsa_disable(struct uart_8250_port *up)
 	if (result)
 		up->port.uartclk = SERIAL_RSA_BAUD_BASE_LO * 16;
 }
+EXPORT_SYMBOL_GPL_FOR_MODULES(rsa_disable, "8250_base");
 
 void rsa_autoconfig(struct uart_8250_port *up)
 {
@@ -189,6 +191,7 @@ void rsa_autoconfig(struct uart_8250_port *up)
 	if (__rsa_enable(up))
 		up->port.type = PORT_RSA;
 }
+EXPORT_SYMBOL_GPL_FOR_MODULES(rsa_autoconfig, "8250_base");
 
 void rsa_reset(struct uart_8250_port *up)
 {
@@ -197,6 +200,7 @@ void rsa_reset(struct uart_8250_port *up)
 
 	serial_out(up, UART_RSA_FRR, 0);
 }
+EXPORT_SYMBOL_GPL_FOR_MODULES(rsa_reset, "8250_base");
 
 #ifdef CONFIG_SERIAL_8250_DEPRECATED_OPTIONS
 #ifndef MODULE
Signature · 1 line
2.49.0