aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/usb/serial/opticon.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2021-04-07 12:39:22 +0200
committerJohan Hovold <johan@kernel.org>2021-04-08 09:46:02 +0200
commitf64d74a59c476df7d5abbddc23011f0d8475c7cc (patch)
treeaaadc42209bad01aade6b89e05e1f9451043d0b5 /drivers/usb/serial/opticon.c
parentUSB: serial: add generic support for TIOCSSERIAL (diff)
downloadwireguard-linux-f64d74a59c476df7d5abbddc23011f0d8475c7cc.tar.xz
wireguard-linux-f64d74a59c476df7d5abbddc23011f0d8475c7cc.zip
USB: serial: stop reporting legacy UART types
The TIOCGSERIAL ioctl can be used to set and retrieve the UART type for legacy UARTs, but some USB serial drivers have been reporting back random types in order to "make user-space happy". Some applications have historically expected TIOCGSERIAL to be implemented, but judging from the Debian sources, the port type not being PORT_UNKNOWN is only used to check for the existence of legacy serial ports (ttySn). Drivers like ftdi_sio have been using PORT_UNKNOWN for twenty years (and option for 10 years) without anyone complaining so let's stop reporting back anything else. In the unlikely event that this do cause problems, this should be fixed tree-wide anyway (e.g. for all USB serial drivers and also CDC-ACM). Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb/serial/opticon.c')
-rw-r--r--drivers/usb/serial/opticon.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/usb/serial/opticon.c b/drivers/usb/serial/opticon.c
index db84afcf7f1a..40c713fae0c3 100644
--- a/drivers/usb/serial/opticon.c
+++ b/drivers/usb/serial/opticon.c
@@ -352,12 +352,6 @@ static int opticon_tiocmset(struct tty_struct *tty,
return 0;
}
-static void get_serial_info(struct tty_struct *tty, struct serial_struct *ss)
-{
- /* fake emulate a 16550 uart to make userspace code happy */
- ss->type = PORT_16550A;
-}
-
static int opticon_port_probe(struct usb_serial_port *port)
{
struct opticon_private *priv;
@@ -399,7 +393,6 @@ static struct usb_serial_driver opticon_device = {
.chars_in_buffer = opticon_chars_in_buffer,
.throttle = usb_serial_generic_throttle,
.unthrottle = usb_serial_generic_unthrottle,
- .get_serial = get_serial_info,
.tiocmget = opticon_tiocmget,
.tiocmset = opticon_tiocmset,
.process_read_urb = opticon_process_read_urb,