diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c index 7f24617474f0..34b47352a136 100644 --- a/drivers/tty/serial/8250/8250_dw.c +++ b/drivers/tty/serial/8250/8250_dw.c @@ -29,7 +29,11 @@ #include +#ifdef MODULE +#include "8250_dwlib.c" +#else #include "8250_dwlib.h" +#endif /* Offsets for the DesignWare specific registers */ #define DW_UART_USR 0x1f /* UART Status Register */ diff --git a/drivers/tty/serial/8250/8250_dwlib.c b/drivers/tty/serial/8250/8250_dwlib.c index fee4f2933919..a0829e157bff 100644 --- a/drivers/tty/serial/8250/8250_dwlib.c +++ b/drivers/tty/serial/8250/8250_dwlib.c @@ -135,4 +135,6 @@ void dw8250_setup_port(struct uart_port *p) if (reg & DW_UART_CPR_SIR_MODE) up->capabilities |= UART_CAP_IRDA; } +#ifndef MODULE EXPORT_SYMBOL_GPL(dw8250_setup_port); +#endif