aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/tty_ioctl.c
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@openvz.org>2012-10-24 15:43:20 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-25 15:07:18 -0400
commit06026d911c31dfa602e14e635a3489b8d67cc786 (patch)
tree9e8ef5fcc3be08dc92ca955be8fd8ec8ddd18736 /drivers/tty/tty_ioctl.c
parentab72fa5523866cb93681abb9f9a401d43a93b7be (diff)
tty: pty - Move TIOCPKT handling into pty.c
Since this ioctl is for pty devices only move it to pty.c. v2: - drop PTY_TYPE_MASTER test since it's master peer ioctl anyway (by jslaby@) Suggested-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> CC: "H. Peter Anvin" <hpa@zytor.com> CC: Pavel Emelyanov <xemul@parallels.com> CC: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/tty_ioctl.c')
-rw-r--r--drivers/tty/tty_ioctl.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/drivers/tty/tty_ioctl.c b/drivers/tty/tty_ioctl.c
index 12b1fa0f4f8..8481b29d5b3 100644
--- a/drivers/tty/tty_ioctl.c
+++ b/drivers/tty/tty_ioctl.c
@@ -1118,7 +1118,6 @@ EXPORT_SYMBOL_GPL(tty_perform_flush);
1118int n_tty_ioctl_helper(struct tty_struct *tty, struct file *file, 1118int n_tty_ioctl_helper(struct tty_struct *tty, struct file *file,
1119 unsigned int cmd, unsigned long arg) 1119 unsigned int cmd, unsigned long arg)
1120{ 1120{
1121 unsigned long flags;
1122 int retval; 1121 int retval;
1123 1122
1124 switch (cmd) { 1123 switch (cmd) {
@@ -1153,26 +1152,6 @@ int n_tty_ioctl_helper(struct tty_struct *tty, struct file *file,
1153 return 0; 1152 return 0;
1154 case TCFLSH: 1153 case TCFLSH:
1155 return tty_perform_flush(tty, arg); 1154 return tty_perform_flush(tty, arg);
1156 case TIOCPKT:
1157 {
1158 int pktmode;
1159
1160 if (tty->driver->type != TTY_DRIVER_TYPE_PTY ||
1161 tty->driver->subtype != PTY_TYPE_MASTER)
1162 return -ENOTTY;
1163 if (get_user(pktmode, (int __user *) arg))
1164 return -EFAULT;
1165 spin_lock_irqsave(&tty->ctrl_lock, flags);
1166 if (pktmode) {
1167 if (!tty->packet) {
1168 tty->packet = 1;
1169 tty->link->ctrl_status = 0;
1170 }
1171 } else
1172 tty->packet = 0;
1173 spin_unlock_irqrestore(&tty->ctrl_lock, flags);
1174 return 0;
1175 }
1176 default: 1155 default:
1177 /* Try the mode commands */ 1156 /* Try the mode commands */
1178 return tty_mode_ioctl(tty, file, cmd, arg); 1157 return tty_mode_ioctl(tty, file, cmd, arg);