diff options
Diffstat (limited to 'drivers/usb/serial/pl2303.c')
-rw-r--r-- | drivers/usb/serial/pl2303.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index 571dcf182866..895d0722183e 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c | |||
@@ -895,10 +895,23 @@ static int wait_modem_info(struct usb_serial_port *port, unsigned int arg) | |||
895 | static int pl2303_ioctl(struct tty_struct *tty, struct file *file, | 895 | static int pl2303_ioctl(struct tty_struct *tty, struct file *file, |
896 | unsigned int cmd, unsigned long arg) | 896 | unsigned int cmd, unsigned long arg) |
897 | { | 897 | { |
898 | struct serial_struct ser; | ||
898 | struct usb_serial_port *port = tty->driver_data; | 899 | struct usb_serial_port *port = tty->driver_data; |
899 | dbg("%s (%d) cmd = 0x%04x", __func__, port->number, cmd); | 900 | dbg("%s (%d) cmd = 0x%04x", __func__, port->number, cmd); |
900 | 901 | ||
901 | switch (cmd) { | 902 | switch (cmd) { |
903 | case TIOCGSERIAL: | ||
904 | memset(&ser, 0, sizeof ser); | ||
905 | ser.type = PORT_16654; | ||
906 | ser.line = port->serial->minor; | ||
907 | ser.port = port->number; | ||
908 | ser.baud_base = 460800; | ||
909 | |||
910 | if (copy_to_user((void __user *)arg, &ser, sizeof ser)) | ||
911 | return -EFAULT; | ||
912 | |||
913 | return 0; | ||
914 | |||
902 | case TIOCMIWAIT: | 915 | case TIOCMIWAIT: |
903 | dbg("%s (%d) TIOCMIWAIT", __func__, port->number); | 916 | dbg("%s (%d) TIOCMIWAIT", __func__, port->number); |
904 | return wait_modem_info(port, arg); | 917 | return wait_modem_info(port, arg); |