diff options
-rw-r--r-- | drivers/char/tty_io.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index 3752edc30c36..a96f26a63fa2 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c | |||
@@ -1173,8 +1173,14 @@ static unsigned int hung_up_tty_poll(struct file * filp, poll_table * wait) | |||
1173 | return POLLIN | POLLOUT | POLLERR | POLLHUP | POLLRDNORM | POLLWRNORM; | 1173 | return POLLIN | POLLOUT | POLLERR | POLLHUP | POLLRDNORM | POLLWRNORM; |
1174 | } | 1174 | } |
1175 | 1175 | ||
1176 | static long hung_up_tty_ioctl(struct file * file, | 1176 | static int hung_up_tty_ioctl(struct inode * inode, struct file * file, |
1177 | unsigned int cmd, unsigned long arg) | 1177 | unsigned int cmd, unsigned long arg) |
1178 | { | ||
1179 | return cmd == TIOCSPGRP ? -ENOTTY : -EIO; | ||
1180 | } | ||
1181 | |||
1182 | static long hung_up_tty_compat_ioctl(struct file * file, | ||
1183 | unsigned int cmd, unsigned long arg) | ||
1178 | { | 1184 | { |
1179 | return cmd == TIOCSPGRP ? -ENOTTY : -EIO; | 1185 | return cmd == TIOCSPGRP ? -ENOTTY : -EIO; |
1180 | } | 1186 | } |
@@ -1222,8 +1228,8 @@ static const struct file_operations hung_up_tty_fops = { | |||
1222 | .read = hung_up_tty_read, | 1228 | .read = hung_up_tty_read, |
1223 | .write = hung_up_tty_write, | 1229 | .write = hung_up_tty_write, |
1224 | .poll = hung_up_tty_poll, | 1230 | .poll = hung_up_tty_poll, |
1225 | .unlocked_ioctl = hung_up_tty_ioctl, | 1231 | .ioctl = hung_up_tty_ioctl, |
1226 | .compat_ioctl = hung_up_tty_ioctl, | 1232 | .compat_ioctl = hung_up_tty_compat_ioctl, |
1227 | .release = tty_release, | 1233 | .release = tty_release, |
1228 | }; | 1234 | }; |
1229 | 1235 | ||