Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173284
b: refs/heads/master
c: 9d4bfd4
h: refs/heads/master
v: v3
  • Loading branch information
Arnd Bergmann authored and Martin Schwidefsky committed Dec 7, 2009
1 parent 74c08a2 commit ce257fc
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cb9d71604a6e3d6aa93bb663747a62fc520da483
refs/heads/master: 9d4bfd418503e90789bbc6685ddde994e613214d
20 changes: 20 additions & 0 deletions trunk/drivers/s390/char/tty3270.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include <linux/slab.h>
#include <linux/bootmem.h>
#include <linux/compat.h>

#include <asm/ccwdev.h>
#include <asm/cio.h>
Expand Down Expand Up @@ -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,
Expand All @@ -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
};

Expand Down

0 comments on commit ce257fc

Please sign in to comment.