Skip to contentSkip to conversation

TTY: move the tty core to drivers/tty

PATCH In review Greg KH 2 participants 6 messages Nov 4, 2010 – Nov 5, 2010

Subsystems (2)
lore
Share & tools
lore

Greg KH

author
#0 lore raw

cover TTY: move the tty core to drivers/tty

Arnd and others,

Here's the latest version of the "move the tty files around" patch that I'd like to send to Linus now that -rc1 is out and things have settled down. It only moves the tty core and the vt code out of drivers/char. I'll do the movement of the serial drivers and other things that were discussed later, for .38, but I wanted to get this move to him now as it's easiest to do so at this point in time.

Any objections to this?

thanks,

greg k-h

author
#2 lore raw

PATCH 2/2 TTY: create drivers/tty/vt and move the vt code there

In reply to Greg KH

From: Greg Kroah-Hartman <[email protected]>

The vt and other related code is moved into the drivers/tty/vt directory.

Cc Arnd Bergmann <[email protected]>
Cc Jiri Slaby <[email protected]>
Cc Alan Cox <[email protected]>,
---
 drivers/char/Makefile                        |   33 -------------------------
 drivers/tty/Makefile                         |    2 +
 drivers/tty/vt/Makefile                      |   34 ++++++++++++++++++++++++++
 drivers/{char => tty/vt}/consolemap.c        |    0
 drivers/{char => tty/vt}/cp437.uni           |    0
 drivers/{char => tty/vt}/defkeymap.c_shipped |    0
 drivers/{char => tty/vt}/defkeymap.map       |    0
 drivers/{char => tty/vt}/keyboard.c          |    0
 drivers/{char => tty/vt}/selection.c         |    0
 drivers/{char => tty/vt}/vc_screen.c         |    0
 drivers/{char => tty/vt}/vt.c                |    0
 drivers/{char => tty/vt}/vt_ioctl.c          |    0
 12 files changed, 36 insertions(+), 33 deletions(-)
 create mode 100644 drivers/tty/vt/Makefile
 rename drivers/{char => tty/vt}/consolemap.c (100%)
 rename drivers/{char => tty/vt}/cp437.uni (100%)
 rename drivers/{char => tty/vt}/defkeymap.c_shipped (100%)
 rename drivers/{char => tty/vt}/defkeymap.map (100%)
 rename drivers/{char => tty/vt}/keyboard.c (100%)
 rename drivers/{char => tty/vt}/selection.c (100%)
 rename drivers/{char => tty/vt}/vc_screen.c (100%)
 rename drivers/{char => tty/vt}/vt.c (100%)
 rename drivers/{char => tty/vt}/vt_ioctl.c (100%)
drivers/char/Makefile +0 -33
index f308494..ba53ec9 100644
@@ -2,18 +2,10 @@
 # Makefile for the kernel character device drivers.
 #
 
-#
-# This file contains the font map for the default (hardware) font
-#
-FONTMAPFILE = cp437.uni
-
 obj-y				+= mem.o random.o
 obj-$(CONFIG_TTY_PRINTK)	+= ttyprintk.o
 obj-y				+= misc.o
-obj-$(CONFIG_VT)		+= vt_ioctl.o vc_screen.o selection.o keyboard.o
 obj-$(CONFIG_BFIN_JTAG_COMM)	+= bfin_jtag_comm.o
-obj-$(CONFIG_CONSOLE_TRANSLATIONS) += consolemap.o consolemap_deftbl.o
-obj-$(CONFIG_HW_CONSOLE)	+= vt.o defkeymap.o
 obj-$(CONFIG_MVME147_SCC)	+= generic_serial.o vme_scc.o
 obj-$(CONFIG_MVME162_SCC)	+= generic_serial.o vme_scc.o
 obj-$(CONFIG_BVME6000_SCC)	+= generic_serial.o vme_scc.o
@@ -106,28 +98,3 @@ obj-$(CONFIG_RAMOOPS)		+= ramoops.o
 
 obj-$(CONFIG_JS_RTC)		+= js-rtc.o
 js-rtc-y = rtc.o
-
-# Files generated that shall be removed upon make clean
-clean-files := consolemap_deftbl.c defkeymap.c
-
-quiet_cmd_conmk = CONMK   $@
-      cmd_conmk = scripts/conmakehash $< > $@
-
-$(obj)/consolemap_deftbl.c: $(src)/$(FONTMAPFILE)
-	$(call cmd,conmk)
-
-$(obj)/defkeymap.o:  $(obj)/defkeymap.c
-
-# Uncomment if you're changing the keymap and have an appropriate
-# loadkeys version for the map. By default, we'll use the shipped
-# versions.
-# GENERATE_KEYMAP := 1
-
-ifdef GENERATE_KEYMAP
-
-$(obj)/defkeymap.c: $(obj)/%.c: $(src)/%.map
-	loadkeys --mktable $< > [email protected]
-	sed -e 's/^static *//' [email protected] > $@
-	rm [email protected]
-
-endif
drivers/tty/Makefile +2 -0
index 7f63b33..c43ef48 100644
@@ -7,3 +7,5 @@ obj-$(CONFIG_MAGIC_SYSRQ)	+= sysrq.o
 obj-$(CONFIG_N_HDLC)		+= n_hdlc.o
 obj-$(CONFIG_N_GSM)		+= n_gsm.o
 obj-$(CONFIG_R3964)		+= n_r3964.o
+
+obj-y				+= vt/
drivers/tty/vt/Makefile new file +34 -0
new file mode 100644
index 0000000..14a51c9
@@ -0,0 +1,34 @@
+#
+# This file contains the font map for the default (hardware) font
+#
+FONTMAPFILE = cp437.uni
+
+obj-$(CONFIG_VT)			+= vt_ioctl.o vc_screen.o \
+					   selection.o keyboard.o
+obj-$(CONFIG_CONSOLE_TRANSLATIONS)	+= consolemap.o consolemap_deftbl.o
+obj-$(CONFIG_HW_CONSOLE)		+= vt.o defkeymap.o
+
+# Files generated that shall be removed upon make clean
+clean-files := consolemap_deftbl.c defkeymap.c
+
+quiet_cmd_conmk = CONMK   $@
+      cmd_conmk = scripts/conmakehash $< > $@
+
+$(obj)/consolemap_deftbl.c: $(src)/$(FONTMAPFILE)
+	$(call cmd,conmk)
+
+$(obj)/defkeymap.o:  $(obj)/defkeymap.c
+
+# Uncomment if you're changing the keymap and have an appropriate
+# loadkeys version for the map. By default, we'll use the shipped
+# versions.
+# GENERATE_KEYMAP := 1
+
+ifdef GENERATE_KEYMAP
+
+$(obj)/defkeymap.c: $(obj)/%.c: $(src)/%.map
+	loadkeys --mktable $< > [email protected]
+	sed -e 's/^static *//' [email protected] > $@
+	rm [email protected]
+
+endif
drivers/tty/vt/consolemap.c renamed from drivers/char/consolemap.c +0 -0
similarity index 100%
rename from drivers/char/consolemap.c
rename to drivers/tty/vt/consolemap.c
drivers/tty/vt/cp437.uni renamed from drivers/char/cp437.uni +0 -0
similarity index 100%
rename from drivers/char/cp437.uni
rename to drivers/tty/vt/cp437.uni
drivers/tty/vt/defkeymap.c_shipped renamed from drivers/char/defkeymap.c_shipped +0 -0
similarity index 100%
rename from drivers/char/defkeymap.c_shipped
rename to drivers/tty/vt/defkeymap.c_shipped
drivers/tty/vt/defkeymap.map renamed from drivers/char/defkeymap.map +0 -0
similarity index 100%
rename from drivers/char/defkeymap.map
rename to drivers/tty/vt/defkeymap.map
drivers/tty/vt/keyboard.c renamed from drivers/char/keyboard.c +0 -0
similarity index 100%
rename from drivers/char/keyboard.c
rename to drivers/tty/vt/keyboard.c
drivers/tty/vt/selection.c renamed from drivers/char/selection.c +0 -0
similarity index 100%
rename from drivers/char/selection.c
rename to drivers/tty/vt/selection.c
drivers/tty/vt/vc_screen.c renamed from drivers/char/vc_screen.c +0 -0
similarity index 100%
rename from drivers/char/vc_screen.c
rename to drivers/tty/vt/vc_screen.c
drivers/tty/vt/vt.c renamed from drivers/char/vt.c +0 -0
similarity index 100%
rename from drivers/char/vt.c
rename to drivers/tty/vt/vt.c
drivers/tty/vt/vt_ioctl.c renamed from drivers/char/vt_ioctl.c +0 -0
similarity index 100%
rename from drivers/char/vt_ioctl.c
rename to drivers/tty/vt/vt_ioctl.c
Signature · 1 line
1.7.3.1
author
#1 lore raw

cover TTY: create drivers/tty and move the tty core files there

In reply to Greg KH

From: Greg Kroah-Hartman <[email protected]>

The tty code should be in its own subdirectory and not in the char driver with all of the cruft that is currently there.

Based on work done by Arnd Bergmann <[email protected]>

Cc Arnd Bergmann <[email protected]>
Cc Jiri Slaby <[email protected]>
Cc Alan Cox <[email protected]>,
---
 drivers/Makefile                   |    1 +
 drivers/char/Makefile              |   11 +----------
 drivers/tty/Makefile               |    9 +++++++++
 drivers/{char => tty}/n_gsm.c      |    0
 drivers/{char => tty}/n_hdlc.c     |    0
 drivers/{char => tty}/n_r3964.c    |    0
 drivers/{char => tty}/n_tty.c      |    0
 drivers/{char => tty}/pty.c        |    0
 drivers/{char => tty}/sysrq.c      |    0
 drivers/{char => tty}/tty_audit.c  |    0
 drivers/{char => tty}/tty_buffer.c |    0
 drivers/{char => tty}/tty_io.c     |    0
 drivers/{char => tty}/tty_ioctl.c  |    0
 drivers/{char => tty}/tty_ldisc.c  |    0
 drivers/{char => tty}/tty_mutex.c  |    0
 drivers/{char => tty}/tty_port.c   |    0
 16 files changed, 11 insertions(+), 10 deletions(-)
 create mode 100644 drivers/tty/Makefile
 rename drivers/{char => tty}/n_gsm.c (100%)
 rename drivers/{char => tty}/n_hdlc.c (100%)
 rename drivers/{char => tty}/n_r3964.c (100%)
 rename drivers/{char => tty}/n_tty.c (100%)
 rename drivers/{char => tty}/pty.c (100%)
 rename drivers/{char => tty}/sysrq.c (100%)
 rename drivers/{char => tty}/tty_audit.c (100%)
 rename drivers/{char => tty}/tty_buffer.c (100%)
 rename drivers/{char => tty}/tty_io.c (100%)
 rename drivers/{char => tty}/tty_ioctl.c (100%)
 rename drivers/{char => tty}/tty_ldisc.c (100%)
 rename drivers/{char => tty}/tty_mutex.c (100%)
 rename drivers/{char => tty}/tty_port.c (100%)
drivers/Makefile +1 -0
index 14cf907..f3ebb30 100644
@@ -26,6 +26,7 @@ obj-$(CONFIG_REGULATOR)		+= regulator/
 
 # char/ comes before serial/ etc so that the VT console is the boot-time
 # default.
+obj-y				+= tty/
 obj-y				+= char/
 
 # gpu/ comes after char for AGP vs DRM startup
drivers/char/Makefile +1 -10
index 3a9c014..f308494 100644
@@ -7,19 +7,13 @@
 #
 FONTMAPFILE = cp437.uni
 
-obj-y	 += mem.o random.o tty_io.o n_tty.o tty_ioctl.o tty_ldisc.o tty_buffer.o tty_port.o
-
-obj-y				+= tty_mutex.o
-obj-$(CONFIG_LEGACY_PTYS)	+= pty.o
-obj-$(CONFIG_UNIX98_PTYS)	+= pty.o
+obj-y				+= mem.o random.o
 obj-$(CONFIG_TTY_PRINTK)	+= ttyprintk.o
 obj-y				+= misc.o
 obj-$(CONFIG_VT)		+= vt_ioctl.o vc_screen.o selection.o keyboard.o
 obj-$(CONFIG_BFIN_JTAG_COMM)	+= bfin_jtag_comm.o
 obj-$(CONFIG_CONSOLE_TRANSLATIONS) += consolemap.o consolemap_deftbl.o
 obj-$(CONFIG_HW_CONSOLE)	+= vt.o defkeymap.o
-obj-$(CONFIG_AUDIT)		+= tty_audit.o
-obj-$(CONFIG_MAGIC_SYSRQ)	+= sysrq.o
 obj-$(CONFIG_MVME147_SCC)	+= generic_serial.o vme_scc.o
 obj-$(CONFIG_MVME162_SCC)	+= generic_serial.o vme_scc.o
 obj-$(CONFIG_BVME6000_SCC)	+= generic_serial.o vme_scc.o
@@ -41,8 +35,6 @@ obj-$(CONFIG_ISI)		+= isicom.o
 obj-$(CONFIG_SYNCLINK)		+= synclink.o
 obj-$(CONFIG_SYNCLINKMP)	+= synclinkmp.o
 obj-$(CONFIG_SYNCLINK_GT)	+= synclink_gt.o
-obj-$(CONFIG_N_HDLC)		+= n_hdlc.o
-obj-$(CONFIG_N_GSM)		+= n_gsm.o
 obj-$(CONFIG_AMIGA_BUILTIN_SERIAL) += amiserial.o
 obj-$(CONFIG_SX)		+= sx.o generic_serial.o
 obj-$(CONFIG_RIO)		+= rio/ generic_serial.o
@@ -74,7 +66,6 @@ obj-$(CONFIG_PRINTER)		+= lp.o
 obj-$(CONFIG_APM_EMULATION)	+= apm-emulation.o
 
 obj-$(CONFIG_DTLK)		+= dtlk.o
-obj-$(CONFIG_R3964)		+= n_r3964.o
 obj-$(CONFIG_APPLICOM)		+= applicom.o
 obj-$(CONFIG_SONYPI)		+= sonypi.o
 obj-$(CONFIG_RTC)		+= rtc.o
drivers/tty/Makefile new file +9 -0
new file mode 100644
index 0000000..7f63b33
@@ -0,0 +1,9 @@
+obj-y				+= 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
+obj-$(CONFIG_AUDIT)		+= tty_audit.o
+obj-$(CONFIG_MAGIC_SYSRQ)	+= sysrq.o
+obj-$(CONFIG_N_HDLC)		+= n_hdlc.o
+obj-$(CONFIG_N_GSM)		+= n_gsm.o
+obj-$(CONFIG_R3964)		+= n_r3964.o
drivers/tty/n_gsm.c renamed from drivers/char/n_gsm.c +0 -0
similarity index 100%
rename from drivers/char/n_gsm.c
rename to drivers/tty/n_gsm.c
drivers/tty/n_hdlc.c renamed from drivers/char/n_hdlc.c +0 -0
similarity index 100%
rename from drivers/char/n_hdlc.c
rename to drivers/tty/n_hdlc.c
drivers/tty/n_r3964.c renamed from drivers/char/n_r3964.c +0 -0
similarity index 100%
rename from drivers/char/n_r3964.c
rename to drivers/tty/n_r3964.c
drivers/tty/n_tty.c renamed from drivers/char/n_tty.c +0 -0
similarity index 100%
rename from drivers/char/n_tty.c
rename to drivers/tty/n_tty.c
drivers/tty/pty.c renamed from drivers/char/pty.c +0 -0
similarity index 100%
rename from drivers/char/pty.c
rename to drivers/tty/pty.c
drivers/tty/sysrq.c renamed from drivers/char/sysrq.c +0 -0
similarity index 100%
rename from drivers/char/sysrq.c
rename to drivers/tty/sysrq.c
drivers/tty/tty_audit.c renamed from drivers/char/tty_audit.c +0 -0
similarity index 100%
rename from drivers/char/tty_audit.c
rename to drivers/tty/tty_audit.c
drivers/tty/tty_buffer.c renamed from drivers/char/tty_buffer.c +0 -0
similarity index 100%
rename from drivers/char/tty_buffer.c
rename to drivers/tty/tty_buffer.c
drivers/tty/tty_io.c renamed from drivers/char/tty_io.c +0 -0
similarity index 100%
rename from drivers/char/tty_io.c
rename to drivers/tty/tty_io.c
drivers/tty/tty_ioctl.c renamed from drivers/char/tty_ioctl.c +0 -0
similarity index 100%
rename from drivers/char/tty_ioctl.c
rename to drivers/tty/tty_ioctl.c
drivers/tty/tty_ldisc.c renamed from drivers/char/tty_ldisc.c +0 -0
similarity index 100%
rename from drivers/char/tty_ldisc.c
rename to drivers/tty/tty_ldisc.c
drivers/tty/tty_mutex.c renamed from drivers/char/tty_mutex.c +0 -0
similarity index 100%
rename from drivers/char/tty_mutex.c
rename to drivers/tty/tty_mutex.c
drivers/tty/tty_port.c renamed from drivers/char/tty_port.c +0 -0
similarity index 100%
rename from drivers/char/tty_port.c
rename to drivers/tty/tty_port.c
Signature · 1 line
1.7.3.1
maintainer Acked-by on the v1 series
#4 lore raw

Re: [00/01] TTY: create drivers/tty and move the tty core files there

Quoted 11 lines · Greg KH

From: Greg Kroah-Hartman <[email protected]>

The tty code should be in its own subdirectory and not in the char driver with all of the cruft that is currently there.

Based on work done by Arnd Bergmann <[email protected]>

Cc Arnd Bergmann <[email protected]>
Cc Jiri Slaby <[email protected]>
Cc Alan Cox <[email protected]>,
maintainer Acked-by on v1 2/2
#3 lore raw

Re: [02/02] TTY: create drivers/tty/vt and move the vt code there

In reply to Greg KH
Quoted 8 lines · Greg KH

From: Greg Kroah-Hartman <[email protected]>

The vt and other related code is moved into the drivers/tty/vt directory.

Cc Arnd Bergmann <[email protected]>
Cc Jiri Slaby <[email protected]>
Cc Alan Cox <[email protected]>,
maintainer
#5 lore raw
In reply to Greg KH
Quoted 6 lines · Greg KH

Here's the latest version of the "move the tty files around" patch that I'd like to send to Linus now that -rc1 is out and things have settled down. It only moves the tty core and the vt code out of drivers/char. I'll do the movement of the serial drivers and other things that were discussed later, for .38, but I wanted to get this move to him now as it's easiest to do so at this point in time.

Ok, that sounds like a good way to stage this.

Thanks,

Arnd