Skip to content

Commit e3e7b13

Browse files
Jiri Slabygregkh
authored andcommitted
serial: allow COMPILE_TEST for some drivers
Some more serial drivers can be compile-tested under certain circumstances (when building a specific architecture). So allow for that. This reduces the need of zillion mach/subarch-specific configs. And since the 0day bot has only allmodconfig's for some archs, this increases build coverage there too. Note that cpm needs a minor update in the header, so that it drags in at least some defines (CPM2 ones). Signed-off-by: Jiri Slaby <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 86b9602 commit e3e7b13

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

drivers/tty/serial/Kconfig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ config SERIAL_PMACZILOG_CONSOLE
783783

784784
config SERIAL_CPM
785785
tristate "CPM SCC/SMC serial port support"
786-
depends on CPM2 || CPM1
786+
depends on CPM2 || CPM1 || (PPC32 && COMPILE_TEST)
787787
select SERIAL_CORE
788788
help
789789
This driver supports the SCC and SMC serial ports on Motorola
@@ -807,7 +807,7 @@ config SERIAL_CPM_CONSOLE
807807

808808
config SERIAL_PIC32
809809
tristate "Microchip PIC32 serial support"
810-
depends on MACH_PIC32
810+
depends on MACH_PIC32 || (MIPS && COMPILE_TEST)
811811
select SERIAL_CORE
812812
help
813813
If you have a PIC32, this driver supports the serial ports.
@@ -1247,7 +1247,7 @@ config SERIAL_XILINX_PS_UART_CONSOLE
12471247

12481248
config SERIAL_AR933X
12491249
tristate "AR933X serial port support"
1250-
depends on HAVE_CLK && ATH79
1250+
depends on (HAVE_CLK && ATH79) || (MIPS && COMPILE_TEST)
12511251
select SERIAL_CORE
12521252
select SERIAL_MCTRL_GPIO if GPIOLIB
12531253
help

drivers/tty/serial/cpm_uart/cpm_uart.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ struct gpio_desc;
1919
#include "cpm_uart_cpm2.h"
2020
#elif defined(CONFIG_CPM1)
2121
#include "cpm_uart_cpm1.h"
22+
#elif defined(CONFIG_COMPILE_TEST)
23+
#include "cpm_uart_cpm2.h"
2224
#endif
2325

2426
#define SERIAL_CPM_MAJOR 204

0 commit comments

Comments
 (0)