tty: Added a CONFIG_TTY option to allow removal of TTY
Subsystems (21)
PATCH 1/1 tty: Added a CONFIG_TTY option to allow removal of TTY
The option allows you to remove TTY and compile without errors. This saves space on systems that won't support TTY interfaces anyway. bloat-o-meter output is below.
The bulk of this patch consists of Kconfig changes adding "depends on TTY" to various serial devices and similar drivers that require the TTY layer. Ideally, these dependencies would occur on a common intermediate symbol such as SERIO, but most drivers "select SERIO" rather than "depends on SERIO", and "select" does not respect dependencies.
bloat-o-meter output filtered to not show removed entries with awk '$3 != "-"' as the list was very long.
add/remove: 0/385 grow/shrink: 2/18 up/down: 14/-54016 (-54002)
function old new delta chr_dev_init 193 205 +12 selinux_setprocattr 1167 1169 +2 static.__warned 557 556 -1 start_kernel 840 835 -5 proc_root_init 167 162 -5 unregister_console 165 157 -8 sys_setsid 213 205 -8 sys_vhangup 37 21 -16 daemonize 689 673 -16 t_stop 72 54 -18 t_next 129 108 -21 static.do_acct_process 838 806 -32 release_task 1157 1125 -32 do_exit 2325 2288 -37 t_start 269 221 -48 static.__func__ 18289 18219 -70 do_task_stat 2962 2892 -70 flush_unauthorized_files 740 614 -126 static._rs 1440 1280 -160 static.__key 8560 8384 -176
--- arch/tile/Kconfig | 1 + drivers/bluetooth/Kconfig | 1 + drivers/char/Kconfig | 7 +- drivers/char/pcmcia/Kconfig | 4 +- drivers/i2c/busses/Kconfig | 2 +- drivers/input/joystick/Kconfig | 7 ++ drivers/input/keyboard/Kconfig | 8 ++- drivers/input/mouse/Kconfig | 3 + drivers/input/serio/Kconfig | 1 + drivers/input/touchscreen/Kconfig | 15 +++- drivers/isdn/Kconfig | 1 + drivers/isdn/capi/Kconfig | 1 + drivers/isdn/gigaset/Kconfig | 1 + drivers/isdn/hardware/mISDN/Kconfig | 1 + drivers/lguest/Kconfig | 2 +- drivers/media/radio/wl128x/Kconfig | 2 +- drivers/misc/Kconfig | 2 +- drivers/misc/ti-st/Kconfig | 2 +- drivers/mmc/card/Kconfig | 1 + drivers/net/caif/Kconfig | 2 +- drivers/net/can/Kconfig | 2 +- drivers/net/hamradio/Kconfig | 4 +- drivers/net/irda/Kconfig | 2 +- drivers/net/ppp/Kconfig | 4 +- drivers/net/slip/Kconfig | 1 + drivers/net/usb/Kconfig | 4 +- drivers/net/wan/Kconfig | 2 +- drivers/pps/clients/Kconfig | 2 +- drivers/tty/Kconfig | 21 ++++-- drivers/tty/Makefile | 2 +- drivers/tty/hvc/Kconfig | 21 +++--- drivers/tty/serial/8250/Kconfig | 1 + drivers/tty/serial/Kconfig | 132 ++++++++++++++++++----------------- drivers/usb/class/Kconfig | 2 +- drivers/usb/serial/Kconfig | 2 +- fs/proc/Makefile | 4 +- include/linux/console.h | 5 ++ include/linux/proc_fs.h | 5 ++ include/linux/tty.h | 39 +++++++++++ lib/Kconfig.kgdb | 1 + net/bluetooth/rfcomm/Kconfig | 1 + net/irda/ircomm/Kconfig | 2 +- sound/soc/codecs/Kconfig | 3 +- 43 files changed, 217 insertions(+), 109 deletions(-)
arch/tile/Kconfig +1 -0
@@ -102,6 +102,7 @@ config DEBUG_COPY_FROM_USER def_bool n config HVC_TILE + depends on TTY select HVC_DRIVER def_bool y
drivers/bluetooth/Kconfig +1 -0
@@ -26,6 +26,7 @@ config BT_HCIBTSDIO config BT_HCIUART tristate "HCI UART driver" + depends on TTY help Bluetooth HCI UART driver. This driver is required if you want to use Bluetooth devices with
drivers/char/Kconfig +4 -3
@@ -53,7 +53,7 @@ source "drivers/tty/serial/Kconfig" config TTY_PRINTK bool "TTY driver to output user messages via printk" - depends on EXPERT + depends on EXPERT && TTY default n ---help--- If you say Y here, the support for writing user messages (i.e.
@@ -174,7 +174,7 @@ source "drivers/tty/hvc/Kconfig" config VIRTIO_CONSOLE tristate "Virtio console" - depends on VIRTIO + depends on VIRTIO && TTY select HVC_DRIVER help Virtio console for use with lguest and other hypervisors.
@@ -407,6 +407,7 @@ config XILINX_HWICAP config R3964 tristate "Siemens R3964 line discipline" + depends on TTY ---help--- This driver allows synchronous communication with devices using the Siemens R3964 packet protocol. Unless you are dealing with special
@@ -454,7 +455,7 @@ source "drivers/char/pcmcia/Kconfig" config MWAVE tristate "ACP Modem (Mwave) support" - depends on X86 + depends on X86 && TTY select SERIAL_8250 ---help--- The ACP modem (Mwave) for Linux is a WinModem. It is composed of a
drivers/char/pcmcia/Kconfig +2 -2
@@ -7,7 +7,7 @@ menu "PCMCIA character devices" config SYNCLINK_CS tristate "SyncLink PC Card support" - depends on PCMCIA + depends on PCMCIA && TTY help Enable support for the SyncLink PC Card serial adapter, running asynchronous and HDLC communications up to 512Kbps. The port is
@@ -45,7 +45,7 @@ config CARDMAN_4040 config IPWIRELESS tristate "IPWireless 3G UMTS PCMCIA card support" - depends on PCMCIA && NETDEVICES + depends on PCMCIA && NETDEVICES && TTY select PPP help This is a driver for 3G UMTS PCMCIA card from IPWireless company. In
drivers/i2c/busses/Kconfig +1 -1
@@ -759,7 +759,7 @@ config I2C_PARPORT_LIGHT config I2C_TAOS_EVM tristate "TAOS evaluation module" - depends on EXPERIMENTAL + depends on EXPERIMENTAL && TTY select SERIO select SERIO_SERPORT default n
drivers/input/joystick/Kconfig +7 -0
@@ -134,6 +134,7 @@ source "drivers/input/joystick/iforce/Kconfig" config JOYSTICK_WARRIOR tristate "Logitech WingMan Warrior joystick" + depends on TTY select SERIO help Say Y here if you have a Logitech WingMan Warrior joystick connected
@@ -144,6 +145,7 @@ config JOYSTICK_WARRIOR config JOYSTICK_MAGELLAN tristate "LogiCad3d Magellan/SpaceMouse 6dof controllers" + depends on TTY select SERIO help Say Y here if you have a Magellan or Space Mouse 6DOF controller
@@ -154,6 +156,7 @@ config JOYSTICK_MAGELLAN config JOYSTICK_SPACEORB tristate "SpaceTec SpaceOrb/Avenger 6dof controllers" + depends on TTY select SERIO help Say Y here if you have a SpaceOrb 360 or SpaceBall Avenger 6DOF
@@ -164,6 +167,7 @@ config JOYSTICK_SPACEORB config JOYSTICK_SPACEBALL tristate "SpaceTec SpaceBall 6dof controllers" + depends on TTY select SERIO help Say Y here if you have a SpaceTec SpaceBall 2003/3003/4000 FLX
@@ -175,6 +179,7 @@ config JOYSTICK_SPACEBALL config JOYSTICK_STINGER tristate "Gravis Stinger gamepad" + depends on TTY select SERIO help Say Y here if you have a Gravis Stinger connected to one of your
@@ -185,6 +190,7 @@ config JOYSTICK_STINGER config JOYSTICK_TWIDJOY tristate "Twiddler as a joystick" + depends on TTY select SERIO help Say Y here if you have a Handykey Twiddler connected to your
@@ -195,6 +201,7 @@ config JOYSTICK_TWIDJOY config JOYSTICK_ZHENHUA tristate "5-byte Zhenhua RC transmitter" + depends on TTY select SERIO help Say Y here if you have a Zhen Hua PPM-4CH transmitter which is
drivers/input/keyboard/Kconfig +7 -1
@@ -69,6 +69,7 @@ config KEYBOARD_ATARI config KEYBOARD_ATKBD tristate "AT keyboard" if EXPERT || !X86 default y + depends on TTY select SERIO select SERIO_LIBPS2 select SERIO_I8042 if X86
@@ -153,6 +154,7 @@ config KEYBOARD_BFIN config KEYBOARD_LKKBD tristate "DECstation/VAXstation LK201/LK401 keyboard" + depends on TTY select SERIO help Say Y here if you want to use a LK201 or LK401 style serial
@@ -265,7 +267,7 @@ config KEYBOARD_HIL_OLD config KEYBOARD_HIL tristate "HP HIL keyboard/pointer support" - depends on GSC || HP300 + depends on (GSC || HP300) && TTY default y select HP_SDC select HIL_MLC
@@ -374,6 +376,7 @@ config KEYBOARD_IMX config KEYBOARD_NEWTON tristate "Newton keyboard" + depends on TTY select SERIO help Say Y here if you have a Newton keyboard on a serial port.
@@ -451,6 +454,7 @@ config KEYBOARD_SAMSUNG config KEYBOARD_STOWAWAY tristate "Stowaway keyboard" + depends on TTY select SERIO help Say Y here if you have a Stowaway keyboard on a serial port.
@@ -462,6 +466,7 @@ config KEYBOARD_STOWAWAY config KEYBOARD_SUNKBD tristate "Sun Type 4 and Type 5 keyboard" + depends on TTY select SERIO help Say Y here if you want to use a Sun Type 4 or Type 5 keyboard,
@@ -560,6 +565,7 @@ config KEYBOARD_TWL4030 config KEYBOARD_XTKBD tristate "XT keyboard" + depends on TTY select SERIO help Say Y here if you want to use the old IBM PC/XT keyboard (or
drivers/input/mouse/Kconfig +3 -0
@@ -14,6 +14,7 @@ if INPUT_MOUSE config MOUSE_PS2 tristate "PS/2 mouse" + depends on TTY default y select SERIO select SERIO_LIBPS2
@@ -138,6 +139,7 @@ config MOUSE_PS2_OLPC config MOUSE_SERIAL tristate "Serial mouse" + depends on TTY select SERIO help Say Y here if you have a serial (RS-232, COM port) mouse connected
@@ -262,6 +264,7 @@ config MOUSE_RISCPC config MOUSE_VSXXXAA tristate "DEC VSXXX-AA/GA mouse and VSXXX-AB tablet" + depends on TTY select SERIO help Say Y (or M) if you want to use a DEC VSXXX-AA (hockey
drivers/input/serio/Kconfig +1 -0
@@ -4,6 +4,7 @@ config SERIO tristate "Serial I/O support" if EXPERT || !X86 default y + depends on TTY help Say Yes here if you have any input device that uses serial I/O to communicate with the system. This includes the
drivers/input/touchscreen/Kconfig +14 -1
@@ -113,7 +113,7 @@ config TOUCHSCREEN_AUO_PIXCIR config TOUCHSCREEN_BITSY tristate "Compaq iPAQ H3600 (Bitsy) touchscreen" - depends on SA1100_BITSY + depends on SA1100_BITSY && TTY select SERIO help Say Y here if you have the h3600 (Bitsy) touchscreen.
@@ -159,6 +159,7 @@ config TOUCHSCREEN_DA9034 config TOUCHSCREEN_DYNAPRO tristate "Dynapro serial touchscreen" + depends on TTY select SERIO help Say Y here if you have a Dynapro serial touchscreen connected to
@@ -171,6 +172,7 @@ config TOUCHSCREEN_DYNAPRO config TOUCHSCREEN_HAMPSHIRE tristate "Hampshire serial touchscreen" + depends on TTY select SERIO help Say Y here if you have a Hampshire serial touchscreen connected to
@@ -202,6 +204,7 @@ config TOUCHSCREEN_EGALAX config TOUCHSCREEN_FUJITSU tristate "Fujitsu serial touchscreen" + depends on TTY select SERIO help Say Y here if you have the Fujitsu touchscreen (such as one
@@ -227,6 +230,7 @@ config TOUCHSCREEN_S3C2410 config TOUCHSCREEN_GUNZE tristate "Gunze AHL-51S touchscreen" + depends on TTY select SERIO help Say Y here if you have the Gunze AHL-51 touchscreen connected to
@@ -239,6 +243,7 @@ config TOUCHSCREEN_GUNZE config TOUCHSCREEN_ELO tristate "Elo serial touchscreens" + depends on TTY select SERIO help Say Y here if you have an Elo serial touchscreen connected to
@@ -251,6 +256,7 @@ config TOUCHSCREEN_ELO config TOUCHSCREEN_WACOM_W8001 tristate "Wacom W8001 penabled serial touchscreen" + depends on TTY select SERIO help Say Y here if you have an Wacom W8001 penabled serial touchscreen
@@ -297,6 +303,7 @@ config TOUCHSCREEN_MCS5000 config TOUCHSCREEN_MTOUCH tristate "MicroTouch serial touchscreens" + depends on TTY select SERIO help Say Y here if you have a MicroTouch (3M) serial touchscreen connected to
@@ -309,6 +316,7 @@ config TOUCHSCREEN_MTOUCH config TOUCHSCREEN_INEXIO tristate "iNexio serial touchscreens" + depends on TTY select SERIO help Say Y here if you have an iNexio serial touchscreen connected to
@@ -376,6 +384,7 @@ config TOUCHSCREEN_HTCPEN config TOUCHSCREEN_PENMOUNT tristate "Penmount serial touchscreen" + depends on TTY select SERIO help Say Y here if you have a Penmount serial touchscreen connected to
@@ -408,6 +417,7 @@ config TOUCHSCREEN_TNETV107X config TOUCHSCREEN_TOUCHRIGHT tristate "Touchright serial touchscreen" + depends on TTY select SERIO help Say Y here if you have a Touchright serial touchscreen connected to
@@ -420,6 +430,7 @@ config TOUCHSCREEN_TOUCHRIGHT config TOUCHSCREEN_TOUCHWIN tristate "Touchwin serial touchscreen" + depends on TTY select SERIO help Say Y here if you have a Touchwin serial touchscreen connected to
@@ -683,6 +694,7 @@ config TOUCHSCREEN_USB_NEXIO config TOUCHSCREEN_TOUCHIT213 tristate "Sahara TouchIT-213 touchscreen" + depends on TTY select SERIO help Say Y here if you have a Sahara TouchIT-213 Tablet PC.
@@ -694,6 +706,7 @@ config TOUCHSCREEN_TOUCHIT213 config TOUCHSCREEN_TSC_SERIO tristate "TSC-10/25/40 serial touchscreen support" + depends on TTY select SERIO help Say Y here if you have a TSC-10, 25 or 40 serial touchscreen connected
drivers/isdn/Kconfig +1 -0
@@ -22,6 +22,7 @@ if ISDN menuconfig ISDN_I4L tristate "Old ISDN4Linux (deprecated)" + depends on TTY ---help--- This driver allows you to use an ISDN adapter for networking connections and as dialin/out device. The isdn-tty's have a built
drivers/isdn/capi/Kconfig +1 -0
@@ -18,6 +18,7 @@ config CAPI_TRACE config ISDN_CAPI_MIDDLEWARE bool "CAPI2.0 Middleware support" + depends on TTY help This option will enhance the capabilities of the /dev/capi20 interface. It will provide a means of moving a data connection,
drivers/isdn/gigaset/Kconfig +1 -0
@@ -1,5 +1,6 @@ menuconfig ISDN_DRV_GIGASET tristate "Siemens Gigaset support" + depends on TTY select CRC_CCITT select BITREVERSE help
drivers/isdn/hardware/mISDN/Kconfig +1 -0
@@ -76,6 +76,7 @@ config MISDN_NETJET tristate "Support for NETJet cards" depends on MISDN depends on PCI + depends on TTY select MISDN_IPAC select ISDN_HDLC select ISDN_I4L
drivers/lguest/Kconfig +1 -1
@@ -1,6 +1,6 @@ config LGUEST tristate "Linux hypervisor example code" - depends on X86_32 && EXPERIMENTAL && EVENTFD + depends on X86_32 && EXPERIMENTAL && EVENTFD && TTY select HVC_DRIVER ---help--- This is a very simple module which allows you to run
drivers/media/radio/wl128x/Kconfig +1 -1
@@ -4,7 +4,7 @@ menu "Texas Instruments WL128x FM driver (ST based)" config RADIO_WL128X tristate "Texas Instruments WL128x FM Radio" - depends on VIDEO_V4L2 && RFKILL && GPIOLIB + depends on VIDEO_V4L2 && RFKILL && GPIOLIB && TTY select TI_ST if NET help Choose Y here if you have this FM radio chip.
drivers/misc/Kconfig +1 -1
@@ -136,7 +136,7 @@ config PHANTOM config INTEL_MID_PTI tristate "Parallel Trace Interface for MIPI P1149.7 cJTAG standard" - depends on PCI + depends on PCI && TTY default n help The PTI (Parallel Trace Interface) driver directs
drivers/misc/ti-st/Kconfig +1 -1
@@ -5,7 +5,7 @@ menu "Texas Instruments shared transport line discipline" config TI_ST tristate "Shared transport core driver" - depends on NET && GPIOLIB + depends on NET && GPIOLIB && TTY select FW_LOADER help This enables the shared transport core driver for TI
drivers/mmc/card/Kconfig +1 -0
@@ -52,6 +52,7 @@ config MMC_BLOCK_BOUNCE config SDIO_UART tristate "SDIO UART/GPS class support" + depends on TTY help SDIO function driver for SDIO cards that implements the UART class, as well as the GPS class which appears like a UART.
drivers/net/caif/Kconfig +1 -1
@@ -6,7 +6,7 @@ comment "CAIF transport drivers" config CAIF_TTY tristate "CAIF TTY transport driver" - depends on CAIF + depends on CAIF && TTY default n ---help--- The CAIF TTY transport driver is a Line Discipline (ldisc)
drivers/net/can/Kconfig +1 -1
@@ -13,7 +13,7 @@ config CAN_VCAN config CAN_SLCAN tristate "Serial / USB serial CAN Adaptors (slcan)" - depends on CAN + depends on CAN && TTY ---help--- CAN driver for several 'low cost' CAN interfaces that are attached via serial lines or via USB-to-serial adapters using the LAWICEL
drivers/net/hamradio/Kconfig +2 -2
@@ -1,6 +1,6 @@ config MKISS tristate "Serial port KISS driver" - depends on AX25 + depends on AX25 && TTY select CRC16 ---help--- KISS is a protocol used for the exchange of data between a computer
@@ -18,7 +18,7 @@ config MKISS config 6PACK tristate "Serial port 6PACK driver" - depends on AX25 + depends on AX25 && TTY ---help--- 6pack is a transmission protocol for the data exchange between your PC and your TNC (the Terminal Node Controller acts as a kind of
drivers/net/irda/Kconfig +1 -1
@@ -5,7 +5,7 @@ comment "SIR device drivers" config IRTTY_SIR tristate "IrTTY (uses Linux serial driver)" - depends on IRDA + depends on IRDA && TTY help Say Y here if you want to build support for the IrTTY line discipline. To compile it as a module, choose M here: the module
drivers/net/ppp/Kconfig +2 -2
@@ -150,7 +150,7 @@ config PPPOL2TP config PPP_ASYNC tristate "PPP support for async serial ports" - depends on PPP + depends on PPP && TTY select CRC_CCITT ---help--- Say Y (or M) here if you want to be able to use PPP over standard
@@ -164,7 +164,7 @@ config PPP_ASYNC config PPP_SYNC_TTY tristate "PPP support for sync tty ports" - depends on PPP + depends on PPP && TTY ---help--- Say Y (or M) here if you want to be able to use PPP over synchronous (HDLC) tty devices, such as the SyncLink adapter. These devices
drivers/net/slip/Kconfig +1 -0
@@ -4,6 +4,7 @@ config SLIP tristate "SLIP (serial line) support" + depends on TTY ---help--- Say Y if you intend to use SLIP or CSLIP (compressed SLIP) to connect to your Internet service provider or to connect to some
drivers/net/usb/Kconfig +2 -2
@@ -400,7 +400,7 @@ config USB_NET_KALMIA config USB_HSO tristate "Option USB High Speed Mobile Devices" - depends on USB && RFKILL + depends on USB && RFKILL && TTY default n help Choose this option if you have an Option HSDPA/HSUPA card.
@@ -448,7 +448,7 @@ config USB_SIERRA_NET config USB_VL600 tristate "LG VL600 modem dongle" - depends on USB_NET_CDCETHER + depends on USB_NET_CDCETHER && TTY select USB_ACM help Select this if you want to use an LG Electronics 4G/LTE usb modem
drivers/net/wan/Kconfig +1 -1
@@ -460,7 +460,7 @@ config LAPBETHER config X25_ASY tristate "X.25 async driver (EXPERIMENTAL)" - depends on LAPB && X25 + depends on LAPB && X25 && TTY ---help--- Send and receive X.25 frames over regular asynchronous serial lines such as telephone lines equipped with ordinary modems.
drivers/pps/clients/Kconfig +1 -1
@@ -17,7 +17,7 @@ config PPS_CLIENT_KTIMER config PPS_CLIENT_LDISC tristate "PPS line discipline" - depends on PPS + depends on PPS && TTY help If you say yes here you get support for a PPS source connected with the CD (Carrier Detect) pin of your serial port.
drivers/tty/Kconfig +16 -5
@@ -1,6 +1,15 @@ +config TTY + bool "Enable TTY" if EXPERT + default y + ---help--- + Allows you to remove TTY support which can save space, and + blocks features that require TTY from inclusion in the kernel. + TTY is required for any text terminals or serial port + communication. Most users should leave this enabled. + config VT bool "Virtual terminal" if EXPERT - depends on !S390 && !UML + depends on !S390 && !UML && TTY select INPUT default y ---help---
@@ -88,6 +97,7 @@ config VT_HW_CONSOLE_BINDING config UNIX98_PTYS bool "Unix98 PTY support" if EXPERT + depends on TTY default y ---help--- A pseudo terminal (PTY) is a software device consisting of two
@@ -122,6 +132,7 @@ config DEVPTS_MULTIPLE_INSTANCES config LEGACY_PTYS bool "Legacy (BSD) PTY support" + depends on TTY default y ---help--- A pseudo terminal (PTY) is a software device consisting of two
@@ -166,7 +177,7 @@ config BFIN_JTAG_COMM_CONSOLE config SERIAL_NONSTANDARD bool "Non-standard serial port support" - depends on HAS_IOMEM + depends on HAS_IOMEM && TTY ---help--- Say Y here if you have any non-standard serial boards -- boards which aren't supported using the standard "dumb" serial driver.
@@ -285,7 +296,7 @@ config SYNCLINK_GT config NOZOMI tristate "HSDPA Broadband Wireless Data Card - Globe Trotter" - depends on PCI && EXPERIMENTAL + depends on PCI && EXPERIMENTAL && TTY help If you have a HSDPA driver Broadband Wireless Data Card - Globe Trotter PCMCIA card, say Y here.
@@ -317,8 +328,7 @@ config N_HDLC config N_GSM tristate "GSM MUX line discipline support (EXPERIMENTAL)" - depends on EXPERIMENTAL - depends on NET + depends on EXPERIMENTAL && NET && TTY help This line discipline provides support for the GSM MUX protocol and presents the mux as a set of 61 individual tty devices.
@@ -342,6 +352,7 @@ config TRACE_ROUTER config TRACE_SINK tristate "Trace data sink for MIPI P1149.7 cJTAG standard" + depends on TTY default n help The trace sink uses the Linux line discipline framework to receive
drivers/tty/Makefile +1 -1
@@ -1,4 +1,4 @@ -obj-y += tty_io.o n_tty.o tty_ioctl.o tty_ldisc.o \ +obj-$(CONFIG_TTY) += tty_io.o n_tty.o tty_ioctl.o tty_ldisc.o \ tty_buffer.o tty_port.o tty_mutex.o obj-$(CONFIG_LEGACY_PTYS) += pty.o obj-$(CONFIG_UNIX98_PTYS) += pty.o
drivers/tty/hvc/Kconfig +11 -10
@@ -1,5 +1,6 @@ config HVC_DRIVER bool + depends on TTY help Generic "hypervisor virtual console" infrastructure for various hypervisors (pSeries, iSeries, Xen, lguest).
@@ -11,7 +12,7 @@ config HVC_IRQ config HVC_CONSOLE bool "pSeries Hypervisor Virtual Console support" - depends on PPC_PSERIES + depends on PPC_PSERIES && TTY select HVC_DRIVER select HVC_IRQ help
@@ -26,7 +27,7 @@ config HVC_OLD_HVSI config HVC_ISERIES bool "iSeries Hypervisor Virtual Console support" - depends on PPC_ISERIES + depends on PPC_ISERIES && TTY default y select HVC_DRIVER select HVC_IRQ
@@ -36,7 +37,7 @@ config HVC_ISERIES config HVC_OPAL bool "OPAL Console support" - depends on PPC_POWERNV + depends on PPC_POWERNV && TTY select HVC_DRIVER select HVC_IRQ default y
@@ -45,21 +46,21 @@ config HVC_OPAL config HVC_RTAS bool "IBM RTAS Console support" - depends on PPC_RTAS + depends on PPC_RTAS && TTY select HVC_DRIVER help IBM Console device driver which makes use of RTAS config HVC_BEAT bool "Toshiba's Beat Hypervisor Console support" - depends on PPC_CELLEB + depends on PPC_CELLEB && TTY select HVC_DRIVER help Toshiba's Cell Reference Set Beat Console device driver config HVC_IUCV bool "z/VM IUCV Hypervisor console support (VM only)" - depends on S390 + depends on S390 && TTY select HVC_DRIVER select IUCV default y
@@ -69,7 +70,7 @@ config HVC_IUCV config HVC_XEN bool "Xen Hypervisor Console support" - depends on XEN + depends on XEN && TTY select HVC_DRIVER select HVC_IRQ default y
@@ -78,13 +79,13 @@ config HVC_XEN config HVC_UDBG bool "udbg based fake hypervisor console" - depends on PPC && EXPERIMENTAL + depends on PPC && EXPERIMENTAL && TTY select HVC_DRIVER default n config HVC_DCC bool "ARM JTAG DCC console" - depends on ARM + depends on ARM && TTY select HVC_DRIVER help This console uses the JTAG DCC on ARM to create a console under the HVC
@@ -93,7 +94,7 @@ config HVC_DCC config HVC_BFIN_JTAG bool "Blackfin JTAG console" - depends on BLACKFIN + depends on BLACKFIN && TTY select HVC_DRIVER help This console uses the Blackfin JTAG to create a console under the
drivers/tty/serial/8250/Kconfig +1 -0
@@ -5,6 +5,7 @@ config SERIAL_8250 tristate "8250/16550 and compatible serial support" + depends on TTY select SERIAL_CORE ---help--- This selects whether you want to include the driver for the standard
drivers/tty/serial/Kconfig +68 -64
541 lines not on this page · raw message
drivers/usb/class/Kconfig +1 -1
@@ -6,7 +6,7 @@ comment "USB Device Class drivers" config USB_ACM tristate "USB Modem (CDC ACM) support" - depends on USB + depends on USB && TTY ---help--- This driver supports USB modems and ISDN adapters which support the Communication Device Class Abstract Control Model interface.
drivers/usb/serial/Kconfig +1 -1
@@ -4,7 +4,7 @@ menuconfig USB_SERIAL tristate "USB Serial Converter support" - depends on USB + depends on USB && TTY ---help--- Say Y here if you have a USB device that provides normal serial ports, or acts like a serial device, and you want to connect it to
fs/proc/Makefile +2 -2
@@ -7,8 +7,8 @@ obj-y += proc.o proc-y := nommu.o task_nommu.o proc-$(CONFIG_MMU) := mmu.o task_mmu.o -proc-y += inode.o root.o base.o generic.o array.o \ - proc_tty.o +proc-y += inode.o root.o base.o generic.o array.o +proc-$(CONFIG_TTY) += proc_tty.o proc-y += cmdline.o proc-y += consoles.o proc-y += cpuinfo.o
include/linux/console.h +5 -0
@@ -151,7 +151,12 @@ extern int is_console_locked(void);extern int braille_register_console (struct console *,int index,char *console_options,char *braille_options);extern int braille_unregister_console (struct console *); +#ifdef CONFIG_TTY extern void console_sysfs_notify (void ); +#else +static inline void console_sysfs_notify (void ) +{ } +#endif extern bool console_suspend_enabled;/* Suspend and resume console messages over PM events */
include/linux/proc_fs.h +5 -0
@@ -123,7 +123,12 @@ extern void pid_ns_release_proc(struct pid_namespace *ns);* proc_tty.c */ struct tty_driver ; +#ifdef CONFIG_TTY extern void proc_tty_init (void ); +#else +static inline void proc_tty_init (void ) +{ } +#endif extern void proc_tty_register_driver (struct tty_driver *driver);extern void proc_tty_unregister_driver (struct tty_driver *driver);
include/linux/tty.h +39 -0
@@ -377,7 +377,12 @@ extern void tty_write_flush(struct tty_struct *);extern struct ktermios tty_std_termios; +#ifdef CONFIG_TTY extern void console_init (void ); +#else +static inline void console_init (void ) +{ } +#endif extern int vcs_init (void );extern struct class *tty_class;
@@ -397,7 +402,12 @@ static inline struct tty_struct *tty_kref_get(struct tty_struct *tty)kref_get (&tty->kref);return tty; } +#ifdef CONFIG_TTY extern void tty_kref_put (struct tty_struct *tty); +#else +static inline void tty_kref_put (struct tty_struct *tty) +{ } +#endif extern int tty_paranoia_check (struct tty_struct *tty,struct inode *inode,const char *routine);
@@ -426,18 +436,33 @@ extern void tty_driver_remove_tty(struct tty_driver *driver,extern void tty_shutdown (struct tty_struct *tty);extern void tty_free_termios (struct tty_struct *tty);extern int is_current_pgrp_orphaned (void ); +#ifdef CONFIG_TTY extern struct pid *tty_get_pgrp (struct tty_struct *tty); +#else +static inline struct pid *tty_get_pgrp (struct tty_struct *tty) +{return NULL ; } +#endif extern int is_ignored (int sig);extern int tty_signal (int sig,struct tty_struct *tty);extern void tty_hangup (struct tty_struct *tty);extern void tty_vhangup (struct tty_struct *tty);extern void tty_vhangup_locked (struct tty_struct *tty); +#ifdef CONFIG_TTY extern void tty_vhangup_self (void ); +#else +static inline void tty_vhangup_self (void ) +{ } +#endif extern void tty_unhangup (struct file *filp);extern int tty_hung_up_p (struct file *filp);extern void do_SAK (struct tty_struct *tty);extern void __do_SAK (struct tty_struct *tty); +#ifdef CONFIG_TTY extern void disassociate_ctty (int priv); +#else +static inline void disassociate_ctty (int priv) +{ } +#endif extern void no_tty (void );extern void tty_flip_buffer_push (struct tty_struct *tty);extern void tty_flush_to_ldisc (struct tty_struct *tty);
@@ -468,9 +493,18 @@ extern long tty_ioctl(struct file *file, unsigned int cmd, unsigned long arg);extern int tty_mode_ioctl (struct tty_struct *tty,struct file *file,unsigned int cmd,unsigned long arg);extern int tty_perform_flush (struct tty_struct *tty,unsigned long arg); +#ifdef CONFIG_TTY extern dev_t tty_devnum (struct tty_struct *tty);extern void proc_clear_tty (struct task_struct *p);extern struct tty_struct *get_current_tty (void ); +#else +static inline dev_t tty_devnum (struct tty_struct *tty) +{return 0 ; } +static inline void proc_clear_tty (struct task_struct *p) +{ } +static inline struct tty_struct *get_current_tty (void ) +{return NULL ; } +#endif extern void tty_default_fops (struct file_operations *fops);extern struct tty_struct *alloc_tty_struct (void );extern int tty_alloc_file (struct file *file);
@@ -578,7 +612,12 @@ static inline int tty_audit_push_task(struct task_struct *tsk,#endif /* tty_io.c */ +#ifdef CONFIG_TTY extern int __init tty_init (void ); +#else +static inline int __init tty_init (void ) +{return 0 ; } +#endif /* tty_ioctl.c */ extern int n_tty_ioctl_helper(struct tty_struct *tty, struct file *file,
lib/Kconfig.kgdb +1 -0
@@ -22,6 +22,7 @@ config KGDB_SERIAL_CONSOLE tristate "KGDB: use kgdb over the serial console" select CONSOLE_POLL select MAGIC_SYSRQ + depends on TTY default y help Share a serial console with kgdb. Sysrq-g must be used
net/bluetooth/rfcomm/Kconfig +1 -0
@@ -12,6 +12,7 @@ config BT_RFCOMM config BT_RFCOMM_TTY bool "RFCOMM TTY support" depends on BT_RFCOMM + depends on TTY help This option enables TTY emulation support for RFCOMM channels.
net/irda/ircomm/Kconfig +1 -1
@@ -1,6 +1,6 @@ config IRCOMM tristate "IrCOMM protocol" - depends on IRDA + depends on IRDA && TTY help Say Y here if you want to build support for the IrCOMM protocol. To compile it as modules, choose M here: the modules will be
sound/soc/codecs/Kconfig +2 -1
@@ -32,7 +32,7 @@ config SND_SOC_ALL_CODECS select SND_SOC_CS42L73 if I2C select SND_SOC_CS4270 if I2C select SND_SOC_CS4271 if SND_SOC_I2C_AND_SPI - select SND_SOC_CX20442 + select SND_SOC_CX20442 if TTY select SND_SOC_DA7210 if I2C select SND_SOC_DFBMCS320 select SND_SOC_JZ4740_CODEC
@@ -199,6 +199,7 @@ config SND_SOC_CS4271 config SND_SOC_CX20442 tristate + depends on TTY config SND_SOC_JZ4740_CODEC tristate
Signature · 1 line
1.7.9.5
drivers/char/Kconfig source "drivers/tty/serial/Kconfig" · line 56
Quoted 8 lines
drivers/char/Kconfig +1
-1@@ -53,7 +53,7 @@ source "drivers/tty/serial/Kconfig" config TTY_PRINTK bool "TTY driver to output user messages via printk" - depends on EXPERT + depends on EXPERT && TTY
A lot of these could be done better with an if I think - notably the serial one and perhaps some of the input ones if the tty users were bunched together.
drivers/char/Kconfig source "drivers/tty/serial/Kconfig" · line 59
Quoted 3 lines
drivers/char/Kconfig +1
-0config MOUSE_PS2 tristate "PS/2 mouse" + depends on TTY
It shouldn't. It would be good to understand why this occurs.
Quoted 5 lines
include/linux/tty.h +0
-0
include/linux/tty.h extern void tty_write_flush(struct tty_struct *); · line 385
Quoted 9 lines
include/linux/tty.h +5
-0@@ -377,7 +377,12 @@ extern void tty_write_flush(struct tty_struct *);extern struct ktermios tty_std_termios; +#ifdef CONFIG_TTY extern void console_init (void ); +#else +static inline void console_init (void ) +{ } +#endif
Please can you bunch the whole lot up into one #if defined() / #else / #endif
rather than lots.
Otherwise this looks very sensible to me.
A message that is not in the archive (sent off-list or not yet received): CADwDc1AvCvWbj8znN-1WbkZA9WYVAqaTkxi7+ENZfJ-qFNRAvw@mail.gmail.com
PATCH 1/1 tty: Added a CONFIG_TTY option to allow removal of TTY
---------- Forwarded message ----------
From: Joe Millenbach <[email protected]>
Date: Thu, Aug 23, 2012 at 5:56 PM
Subject: Re: [PATCH] tty: Added a CONFIG_TTY option to allow removal of TTY
To: Alan Cox <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>, Alan Cox <[email protected]>, [email protected], [email protected], Josh Triplett <[email protected]>, [email protected]
Quoted 8 lines · Alan Cox
...
Quoted 3 lines
config
MOUSE_PS2
tristate "PS/2 mouse"
+ depends on TTYIt shouldn't. It would be good to understand why this occurs.
If I enable this config option, and turn off TTY I get the below errors.
drivers/built-in.o: In function `serport_ldisc_read':
serport.c:(.text+0x1aace6): undefined reference to tty_name' serport.c:(.text+0x1aad57): undefined reference to tty_name' drivers/built-in.o: In function `serport_init':
serport.c:(.init.text+0x8478): undefined reference to tty_register_ldisc' drivers/built-in.o: In function serport_exit':
serport.c:(.exit.text+0xb29): undefined reference to `tty_unregister_ldisc'
All because MOUSE_PS2 depends on SERIO, just like a lot of entries I blocked. I assume this means I should keep the dependency on TTY. Unfortunately, I don't have time to dig deeper for the true cause of the dependency right now.
- Joe
* Resending message as I forgot to turn off HTML messaging in Gmail (sorry), and I've heard SPAM blockers might eat HTML messages sent to LKML people.
- Joe
Quoted 32 lines · On Thu, 23 Aug 2012 18:14:48 -0700 Joe Millenbach <[email protected]> wrote:
---------- Forwarded message ----------
From: Joe Millenbach <[email protected]>
Date: Thu, Aug 23, 2012 at 5:56 PM
Subject: Re: [PATCH] tty: Added aCONFIG_TTYoption to allow removal of TTY
To: Alan Cox <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>, Alan Cox <[email protected]>, [email protected], [email protected], Josh Triplett <[email protected]>, [email protected]Quoted 8 lines · Alan Cox
...
Quoted 3 lines
config
MOUSE_PS2
tristate "PS/2 mouse"
+ depends on TTYIt shouldn't. It would be good to understand why this occurs.
If I enable this config option, and turn off TTY I get the below errors.
drivers/built-in.o: In function `serport_ldisc_read':
serport.c:(.text+0x1aace6): undefined reference totty_name' serport.c:(.text+0x1aad57): undefined reference totty_name'drivers/built-in.o: In function `serport_init':
serport.c:(.init.text+0x8478): undefined reference totty_register_ldisc' drivers/built-in.o: In functionserport_exit':
serport.c:(.exit.text+0xb29): undefined reference to `tty_unregister_ldisc'
Quoted 4 lines
All because
MOUSE_PS2depends on SERIO, just like a lot of entries I blocked. I assume this means I should keep the dependency on TTY. Unfortunately, I don't have time to dig deeper for the true cause of the dependency right now.
The true cause I think is that serio/serport.c should depend on tty to be built but the ps/2 mouse bits shouldn't.
Alan
Quoted 23 lines · Alan Cox
Quoted 21 lines · On Thu, 23 Aug 2012 18:14:48 -0700 Joe Millenbach <[email protected]> wrote:
Quoted 8 lines · Alan Cox
...
Quoted 3 lines
config
MOUSE_PS2
tristate "PS/2 mouse"
+ depends on TTYIt shouldn't. It would be good to understand why this occurs.
If I enable this config option, and turn off TTY I get the below errors.
drivers/built-in.o: In function `serport_ldisc_read':
serport.c:(.text+0x1aace6): undefined reference totty_name' serport.c:(.text+0x1aad57): undefined reference totty_name'drivers/built-in.o: In function `serport_init':
serport.c:(.init.text+0x8478): undefined reference totty_register_ldisc' drivers/built-in.o: In functionserport_exit':
serport.c:(.exit.text+0xb29): undefined reference to `tty_unregister_ldisc'
Quoted 7 lines
Quoted 4 lines
All because
MOUSE_PS2depends on SERIO, just like a lot of entries I blocked. I assume this means I should keep the dependency on TTY. Unfortunately, I don't have time to dig deeper for the true cause of the dependency right now.The true cause I think is that
serio/serport.cshould depend on tty to be built but the ps/2 mouse bits shouldn't.
On the other hand, most people disabling CONFIG_TTY will be building an extreme embedded system, and on such a system a PS/2 mouse seems highly unlikely. Given that, perhaps the goal of removing dependencies on TTY could happen incrementally once CONFIG_TTY exists?
- Josh Triplett
Quoted 8 lines
Quoted 3 lines
The true cause I think is that
serio/serport.cshould depend on tty to be built but the ps/2 mouse bits shouldn't.On the other hand, most people disabling
CONFIG_TTYwill be building an extreme embedded system, and on such a system a PS/2 mouse seems highly unlikely. Given that, perhaps the goal of removing dependencies on TTY could happen incrementally onceCONFIG_TTYexists?
Fine by me