tty: move tioclinux from a special case

Right now we have ifdefs and hooks in the core ioctl handler for TIOCLINUX
and then test if its a console. This is brain dead. Instead call the
tioclinux helper from the relevant driver ioctl methods.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Alan Cox
2008-10-13 10:36:40 +01:00
committed by Linus Torvalds
parent b70ac77185
commit e688510773
3 changed files with 2 additions and 6 deletions

View File

@@ -395,6 +395,8 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
kbd = kbd_table + console;
switch (cmd) {
case TIOCLINUX:
return tioclinux(tty, arg);
case KIOCSOUND:
if (!perm)
goto eperm;