Merge tag 'tty-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
[linux-2.6-microblaze.git] / drivers / tty / tty_ioctl.c
index 4de1c6d..41f7449 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/bitops.h>
 #include <linux/mutex.h>
 #include <linux/compat.h>
+#include "tty.h"
 
 #include <asm/io.h>
 #include <linux/uaccess.h>
@@ -57,8 +58,7 @@ int tty_chars_in_buffer(struct tty_struct *tty)
 {
        if (tty->ops->chars_in_buffer)
                return tty->ops->chars_in_buffer(tty);
-       else
-               return 0;
+       return 0;
 }
 EXPORT_SYMBOL(tty_chars_in_buffer);
 
@@ -774,8 +774,8 @@ int tty_mode_ioctl(struct tty_struct *tty, struct file *file,
        case TCSETX:
        case TCSETXW:
        case TCSETXF:
-               return -EINVAL;
-#endif         
+               return -ENOTTY;
+#endif
        case TIOCGSOFTCAR:
                copy_termios(real_tty, &kterm);
                ret = put_user((kterm.c_cflag & CLOCAL) ? 1 : 0,