]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit212699725aaebc78c857efb898e88775f59fa956
tree11b7807c51cb259bfdbd220fcfde0acdac9cac45
parent0634423d270dac19140a762b0da7e320aee6a248
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