summaryrefslogtreecommitdiff
path: root/drivers/tty/n_gsm.c
diff options
context:
space:
mode:
authorLars Poeschel <poeschel@lemonage.de>2017-08-15 14:58:27 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-08-28 21:51:22 +0300
commit199e717f252be0e31c97b9c7861dd6e2abfaa936 (patch)
treeb15ed17c63982f12a20f3cde0c2cdd442b07a5ba /drivers/tty/n_gsm.c
parenta846c3e5f338206c84e292a57abde0b06f1777c8 (diff)
downloadlinux-199e717f252be0e31c97b9c7861dd6e2abfaa936.tar.xz
tty: n_gsm: Add compat_ioctl
To use this driver with 32 bit userspace applications on 64 bit kernels a compat_ioctl is needed. Signed-off-by: Lars Poeschel <poeschel@lemonage.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/n_gsm.c')
-rw-r--r--drivers/tty/n_gsm.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index 2afe5fce68e3..0a3c9665e015 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
@@ -2607,6 +2607,14 @@ static int gsmld_ioctl(struct tty_struct *tty, struct file *file,
}
}
+#ifdef CONFIG_COMPAT
+static long gsmld_compat_ioctl(struct tty_struct *tty, struct file *file,
+ unsigned int cmd, unsigned long arg)
+{
+ return gsmld_ioctl(tty, file, cmd, arg);
+}
+#endif
+
/*
* Network interface
*
@@ -2818,6 +2826,9 @@ static struct tty_ldisc_ops tty_ldisc_packet = {
.flush_buffer = gsmld_flush_buffer,
.read = gsmld_read,
.write = gsmld_write,
+#ifdef CONFIG_COMPAT
+ .compat_ioctl = gsmld_compat_ioctl,
+#endif
.ioctl = gsmld_ioctl,
.poll = gsmld_poll,
.receive_buf = gsmld_receive_buf,