Skip to content

Commit b20d657

Browse files
Jiri Slaby (SUSE)gregkh
authored andcommitted
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.) Signed-off-by: "Jiri Slaby (SUSE)" <[email protected]> Reported-by: Stephen Rothwell <[email protected]> Link: https://lore.kernel.org/all/[email protected]/ Fixes: 5a128fb ("serial: 8250: move RSA functions to 8250_rsa.c") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 7dfd023 commit b20d657

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/tty/serial/8250/8250_rsa.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ void rsa_enable(struct uart_8250_port *up)
147147
if (up->port.uartclk == SERIAL_RSA_BAUD_BASE * 16)
148148
serial_out(up, UART_RSA_FRR, 0);
149149
}
150+
EXPORT_SYMBOL_GPL_FOR_MODULES(rsa_enable, "8250_base");
150151

151152
/*
152153
* Attempts to turn off the RSA FIFO and resets the RSA board back to 115kbps compat mode. It is
@@ -178,6 +179,7 @@ void rsa_disable(struct uart_8250_port *up)
178179
up->port.uartclk = SERIAL_RSA_BAUD_BASE_LO * 16;
179180
uart_port_unlock_irq(&up->port);
180181
}
182+
EXPORT_SYMBOL_GPL_FOR_MODULES(rsa_disable, "8250_base");
181183

182184
void rsa_autoconfig(struct uart_8250_port *up)
183185
{
@@ -190,6 +192,7 @@ void rsa_autoconfig(struct uart_8250_port *up)
190192
if (__rsa_enable(up))
191193
up->port.type = PORT_RSA;
192194
}
195+
EXPORT_SYMBOL_GPL_FOR_MODULES(rsa_autoconfig, "8250_base");
193196

194197
void rsa_reset(struct uart_8250_port *up)
195198
{
@@ -198,6 +201,7 @@ void rsa_reset(struct uart_8250_port *up)
198201

199202
serial_out(up, UART_RSA_FRR, 0);
200203
}
204+
EXPORT_SYMBOL_GPL_FOR_MODULES(rsa_reset, "8250_base");
201205

202206
#ifdef CONFIG_SERIAL_8250_DEPRECATED_OPTIONS
203207
#ifndef MODULE

0 commit comments

Comments
 (0)