'source' (include) all of the tty/*/Kconfig files from drivers/tty/Kconfig instead of from drivers/char/Kconfig. This consolidates them both in source code and in menu presentation to the user. Move hvc/Kconfig and serial/Kconfig 'source' lines into the if TTY/endif block and remove the if TTY/endif blocks from those 2 files. Suggested-by: Arnd Bergmann <arnd@xxxxxxxx> Suggested-by: Jiri Slaby <jslaby@xxxxxxxx> Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx> Cc: Arnd Bergmann <arnd@xxxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> Cc: Jiri Slaby <jslaby@xxxxxxxx> Cc: linux-serial@xxxxxxxxxxxxxxx --- v2: move hvc/Kconfig & serial/Kconfig lines and drop their if/endif blocks drivers/char/Kconfig | 5 ----- drivers/tty/Kconfig | 6 ++++++ drivers/tty/hvc/Kconfig | 3 --- drivers/tty/serial/Kconfig | 4 ---- 4 files changed, 6 insertions(+), 12 deletions(-) --- linux-next-20200311.orig/drivers/char/Kconfig +++ linux-next-20200311/drivers/char/Kconfig @@ -7,9 +7,6 @@ menu "Character devices" source "drivers/tty/Kconfig" -source "drivers/tty/serial/Kconfig" -source "drivers/tty/serdev/Kconfig" - config TTY_PRINTK tristate "TTY driver to output user messages via printk" depends on EXPERT && TTY @@ -94,8 +91,6 @@ config PPDEV If unsure, say N. -source "drivers/tty/hvc/Kconfig" - config VIRTIO_CONSOLE tristate "Virtio console" depends on VIRTIO && TTY --- linux-next-20200311.orig/drivers/tty/Kconfig +++ linux-next-20200311/drivers/tty/Kconfig @@ -477,4 +477,10 @@ config LDISC_AUTOLOAD dev.tty.ldisc_autoload sysctl, this configuration option will only set the default value of this functionality. +source "drivers/tty/hvc/Kconfig" + +source "drivers/tty/serial/Kconfig" + endif # TTY + +source "drivers/tty/serdev/Kconfig" --- linux-next-20200311.orig/drivers/tty/hvc/Kconfig +++ linux-next-20200311/drivers/tty/hvc/Kconfig @@ -1,5 +1,4 @@ # SPDX-License-Identifier: GPL-2.0 -if TTY config HVC_DRIVER bool @@ -113,5 +112,3 @@ config HVCS will depend on arch specific APIs exported from hvcserver.ko which will also be compiled when this driver is built as a module. - -endif # TTY --- linux-next-20200311.orig/drivers/tty/serial/Kconfig +++ linux-next-20200311/drivers/tty/serial/Kconfig @@ -3,8 +3,6 @@ # Serial device configuration # -if TTY - menu "Serial drivers" depends on HAS_IOMEM @@ -1566,5 +1564,3 @@ endmenu config SERIAL_MCTRL_GPIO tristate - -endif # TTY