If the 8250 driver is compiled as a module then CONFIG_SERIAL_8250_MODULE is defined and not CONFIG_SERIAL_8250. This results in all those code sections that require CONFIG_SERIAL_8250 to be defined are not included. This patch fixes the situation and allows 8250 and of-serial to be compiled as a module with the same functionality as when compiled into the kernel.
Unified · Split
| @@ -21,6 +21,10 @@ · 20 unmodified lines | |||
| 21 | #include <linux/nwpserial.h> | 21 | #include <linux/nwpserial.h> |
| 22 | #include <linux/clk.h> | 22 | #include <linux/clk.h> |
| 23 | 23 | ||
| 24 | #ifdef CONFIG_SERIAL_8250_MODULE | ||
| 25 | #define CONFIG_SERIAL_8250 CONFIG_SERIAL_8250_MODULE | ||
| 26 | #endif | ||
| 27 | |||
| 24 | #include "8250/8250.h" | 28 | #include "8250/8250.h" |
| 25 | 29 | ||
| 26 | struct of_serial_info { | 30 | struct of_serial_info { |