[PATCH v1 1/1] serial: 8250_fsl: Export fsl8250_handle_irq() conditionally

Andy Shevchenko
2026-05-04T15:13:02Z

Move fsl8250_handle_irq() prototype out of the rest of 8250 generic APIs
in the header and export it conditionally when CONFIG_SERIAL_8250_FSL
is provided.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
include/linux/serial_8250.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h
index 1be007225b0e..43eb0d15012f 100644
--- a/include/linux/serial_8250.h
+++ b/include/linux/serial_8250.h
@@ -197,7 +197,6 @@ void serial8250_do_pm(struct uart_port *port, unsigned int state,
void serial8250_do_set_mctrl(struct uart_port *port, unsigned int mctrl);
void serial8250_do_set_divisor(struct uart_port *port, unsigned int baud,
unsigned int quot);
-int fsl8250_handle_irq(struct uart_port *port);
void serial8250_handle_irq_locked(struct uart_port *port, unsigned int iir);
int serial8250_handle_irq(struct uart_port *port, unsigned int iir);
u16 serial8250_rx_chars(struct uart_8250_port *up, u16 lsr);
@@ -220,6 +219,10 @@ extern int hp300_setup_serial_console(void) __init;
static inline int hp300_setup_serial_console(void) { return 0; }
#endif

+#if IS_REACHABLE(CONFIG_SERIAL_8250_FSL)
+int fsl8250_handle_irq(struct uart_port *port);
+#endif
+
#ifdef CONFIG_SERIAL_8250_RT288X
int rt288x_setup(struct uart_port *p);
int au_platform_setup(struct plat_serial8250_port *p);
--
2.50.1