USB: serial: ftdi_sio: tighten device-type detection
authorJohan Hovold <johan@kernel.org>
Sun, 11 Sep 2022 14:02:10 +0000 (16:02 +0200)
committerJohan Hovold <johan@kernel.org>
Thu, 15 Sep 2022 06:05:54 +0000 (08:05 +0200)
commitf353c0d43006a485b999035b7cb387f76bdd7291
tree11b7807c51cb259bfdbd220fcfde0acdac9cac45
parent027bf37dbe82bb6ce8aa7845f5c7653a869695cd
USB: serial: ftdi_sio: tighten device-type detection

Clean up and tighten the device-type detection, which is based on
bcdDevice.

Don't make assumptions about unknown (future) types (currently assumed
to be either FT2232C or FT-X depending on bNumInterfaces) and instead
log an error and refuse to bind so that we can add proper support when
needed.

Note that the bcdDevice values have been provided by FTDI.

Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/ftdi_sio.c