aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/tty_ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/tty_ioctl.c')
-rw-r--r--drivers/char/tty_ioctl.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/char/tty_ioctl.c b/drivers/char/tty_ioctl.c
index ea9fc5d03b99..bf34e4597421 100644
--- a/drivers/char/tty_ioctl.c
+++ b/drivers/char/tty_ioctl.c
@@ -937,12 +937,14 @@ int tty_mode_ioctl(struct tty_struct *tty, struct file *file,
937 return 0; 937 return 0;
938#endif 938#endif
939 case TIOCGSOFTCAR: 939 case TIOCGSOFTCAR:
940 return put_user(C_CLOCAL(tty) ? 1 : 0, 940 /* FIXME: for correctness we may need to take the termios
941 lock here - review */
942 return put_user(C_CLOCAL(real_tty) ? 1 : 0,
941 (int __user *)arg); 943 (int __user *)arg);
942 case TIOCSSOFTCAR: 944 case TIOCSSOFTCAR:
943 if (get_user(arg, (unsigned int __user *) arg)) 945 if (get_user(arg, (unsigned int __user *) arg))
944 return -EFAULT; 946 return -EFAULT;
945 return tty_change_softcar(tty, arg); 947 return tty_change_softcar(real_tty, arg);
946 default: 948 default:
947 return -ENOIOCTLCMD; 949 return -ENOIOCTLCMD;
948 } 950 }