Commit 6fbd9142 authored by Johan Hovold's avatar Johan Hovold

USB: serial: ftdi_sio: clean up modem-status handling

All chip types but the original SIO (FT8U100AX) return a two-byte modem
status and there's no need to explicitly list every other type in the
handler.
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
parent f353c0d4
...@@ -2820,27 +2820,13 @@ static int ftdi_get_modem_status(struct usb_serial_port *port, ...@@ -2820,27 +2820,13 @@ static int ftdi_get_modem_status(struct usb_serial_port *port,
if (!buf) if (!buf)
return -ENOMEM; return -ENOMEM;
/* /*
* The 8U232AM returns a two byte value (the SIO a 1 byte value) in * The device returns a two byte value (the SIO a 1 byte value) in the
* the same format as the data returned from the in point. * same format as the data returned from the IN endpoint.
*/ */
switch (priv->chip_type) { if (priv->chip_type == SIO)
case SIO:
len = 1; len = 1;
break; else
case FT232A:
case FT232B:
case FT2232C:
case FT232R:
case FT2232H:
case FT4232H:
case FT232H:
case FTX:
len = 2; len = 2;
break;
default:
ret = -EFAULT;
goto out;
}
ret = usb_control_msg(port->serial->dev, ret = usb_control_msg(port->serial->dev,
usb_rcvctrlpipe(port->serial->dev, 0), usb_rcvctrlpipe(port->serial->dev, 0),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment