summaryrefslogtreecommitdiff
path: root/drivers/usb/serial/ftdi_sio.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2022-09-11 17:02:15 +0300
committerJohan Hovold <johan@kernel.org>2022-09-15 09:06:05 +0300
commit1a0398915d2243fc14be6506a6d226e0593a1c33 (patch)
tree52869cc1620d141c7833a4730c2090ba6f346f16 /drivers/usb/serial/ftdi_sio.c
parent4d50f4fc67d6e903266ff3769d655729a070d490 (diff)
downloadlinux-1a0398915d2243fc14be6506a6d226e0593a1c33.tar.xz
USB: serial: ftdi_sio: simplify divisor handling
In preparation for adding further Hi-Speed types, assume the device type is Hi-Speed unless it's an explicitly listed legacy type when determining divisors. Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb/serial/ftdi_sio.c')
-rw-r--r--drivers/usb/serial/ftdi_sio.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 40343ab0ef03..79069c0fb587 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -1369,9 +1369,7 @@ static u32 get_ftdi_divisor(struct tty_struct *tty,
baud = 9600;
}
break;
- case FT2232H:
- case FT4232H:
- case FT232H:
+ default:
if ((baud <= 12000000) && (baud >= 1200)) {
div_value = ftdi_2232h_baud_to_divisor(baud);
} else if (baud < 1200) {