USB: serial: ftdi_sio: clean up chip type enum
authorJohan Hovold <johan@kernel.org>
Sun, 11 Sep 2022 14:02:05 +0000 (16:02 +0200)
committerJohan Hovold <johan@kernel.org>
Thu, 15 Sep 2022 06:05:45 +0000 (08:05 +0200)
Clean up the chip type enum by dropping the explicit values and moving
the definition to the implementation to make it easier to add further
types.

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

index 787e63f..54a7928 100644 (file)
 #define DRIVER_AUTHOR "Greg Kroah-Hartman <greg@kroah.com>, Bill Ryder <bryder@sgi.com>, Kuba Ober <kuba@mareimbrium.org>, Andreas Mohr, Johan Hovold <jhovold@gmail.com>"
 #define DRIVER_DESC "USB FTDI Serial Converters Driver"
 
+enum ftdi_chip_type {
+       SIO,
+       FT8U232AM,
+       FT232BM,
+       FT2232C,
+       FT232RL,
+       FT2232H,
+       FT4232H,
+       FT232H,
+       FTX,
+};
 
 struct ftdi_private {
        enum ftdi_chip_type chip_type;
index be1641e..12bc3a8 100644 (file)
  * not supported by the FT8U232AM).
  */
 
-enum ftdi_chip_type {
-       SIO = 1,
-       FT8U232AM = 2,
-       FT232BM = 3,
-       FT2232C = 4,
-       FT232RL = 5,
-       FT2232H = 6,
-       FT4232H = 7,
-       FT232H  = 8,
-       FTX     = 9,
-};
-
 enum ftdi_sio_baudrate {
        ftdi_sio_b300 = 0,
        ftdi_sio_b600 = 1,