mxser: remove MOXA_SET_BAUD_METHOD ioctl
authorJiri Slaby <jslaby@suse.cz>
Fri, 18 Jun 2021 06:14:29 +0000 (08:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Jun 2021 11:10:00 +0000 (13:10 +0200)
1) The semantics are defined exactly nowhere.
2) The ioctl definition was never exposed to userspace, so noone should
   actually be reliably using this.
3) It's not even mentioned in any of the mxser utilities.

Provided the above, remove this mxser-special ioctl.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20210618061516.662-24-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/mxser.c

index a55b20f98cb33f8cf991958a79ce645e154ec3b0..cf3b8f9f7e1ef39abc33ac3c0f270e7d2bfd9304 100644 (file)
@@ -68,7 +68,6 @@
 #define MOXA_ASPP_MON          (MOXA + 73)
 #define MOXA_ASPP_LSTATUS      (MOXA + 74)
 #define MOXA_ASPP_MON_EXT      (MOXA + 75)
-#define MOXA_SET_BAUD_METHOD   (MOXA + 76)
 
 /* --------------------------------------------------- */
 
@@ -381,7 +380,6 @@ struct mxser_mstatus {
 static struct mxser_board mxser_boards[MXSER_BOARDS];
 static struct tty_driver *mxvar_sdriver;
 static struct mxser_log mxvar_log;
-static int mxser_set_baud_method[MXSER_PORTS + 1];
 
 static void mxser_enable_must_enchance_mode(unsigned long baseio)
 {
@@ -738,8 +736,7 @@ static void mxser_change_speed(struct tty_struct *tty)
        if (!info->ioaddr)
                return;
 
-       if (mxser_set_baud_method[tty->index] == 0)
-               mxser_set_baud(tty, tty_get_baud_rate(tty));
+       mxser_set_baud(tty, tty_get_baud_rate(tty));
 
        /* byte size and parity */
        switch (cflag & CSIZE) {
@@ -1788,14 +1785,6 @@ static int mxser_ioctl(struct tty_struct *tty,
                info->err_shadow = 0;
                return 0;
        }
-       case MOXA_SET_BAUD_METHOD: {
-               int method;
-
-               if (get_user(method, (int __user *)argp))
-                       return -EFAULT;
-               mxser_set_baud_method[tty->index] = method;
-               return put_user(method, (int __user *)argp);
-       }
        default:
                return -ENOIOCTLCMD;
        }