diff options
author | Arnd Bergmann <arnd@arndb.de> | 2009-12-07 12:52:13 +0100 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2009-12-07 12:51:38 +0100 |
commit | 9d4bfd418503e90789bbc6685ddde994e613214d (patch) | |
tree | 1584548178f695f2a52ab27a1b6e047a0ddaa63f /drivers/s390 | |
parent | cb9d71604a6e3d6aa93bb663747a62fc520da483 (diff) | |
download | linux-stable-9d4bfd418503e90789bbc6685ddde994e613214d.tar.gz linux-stable-9d4bfd418503e90789bbc6685ddde994e613214d.tar.bz2 linux-stable-9d4bfd418503e90789bbc6685ddde994e613214d.zip |
[S390] tty3270: move keyboard compat ioctls
All keyboard ioctls are compatible, so we can simply
move the compat handling into the vt and tty3270 drivers.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/char/tty3270.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/s390/char/tty3270.c b/drivers/s390/char/tty3270.c index 38385677c653..911822db614d 100644 --- a/drivers/s390/char/tty3270.c +++ b/drivers/s390/char/tty3270.c @@ -19,6 +19,7 @@ #include <linux/slab.h> #include <linux/bootmem.h> +#include <linux/compat.h> #include <asm/ccwdev.h> #include <asm/cio.h> @@ -1731,6 +1732,22 @@ tty3270_ioctl(struct tty_struct *tty, struct file *file, return kbd_ioctl(tp->kbd, file, cmd, arg); } +#ifdef CONFIG_COMPAT +static long +tty3270_compat_ioctl(struct tty_struct *tty, struct file *file, + unsigned int cmd, unsigned long arg) +{ + struct tty3270 *tp; + + tp = tty->driver_data; + if (!tp) + return -ENODEV; + if (tty->flags & (1 << TTY_IO_ERROR)) + return -EIO; + return kbd_ioctl(tp->kbd, file, cmd, (unsigned long)compat_ptr(arg)); +} +#endif + static const struct tty_operations tty3270_ops = { .open = tty3270_open, .close = tty3270_close, @@ -1745,6 +1762,9 @@ static const struct tty_operations tty3270_ops = { .hangup = tty3270_hangup, .wait_until_sent = tty3270_wait_until_sent, .ioctl = tty3270_ioctl, +#ifdef CONFIG_COMPAT + .compat_ioctl = tty3270_compat_ioctl, +#endif .set_termios = tty3270_set_termios }; |