Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

USB: serial: ftdi_sio: clean up chip type enum

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>

+11 -12
+11
drivers/usb/serial/ftdi_sio.c
··· 47 47 #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>" 48 48 #define DRIVER_DESC "USB FTDI Serial Converters Driver" 49 49 50 + enum ftdi_chip_type { 51 + SIO, 52 + FT8U232AM, 53 + FT232BM, 54 + FT2232C, 55 + FT232RL, 56 + FT2232H, 57 + FT4232H, 58 + FT232H, 59 + FTX, 60 + }; 50 61 51 62 struct ftdi_private { 52 63 enum ftdi_chip_type chip_type;
-12
drivers/usb/serial/ftdi_sio.h
··· 153 153 * not supported by the FT8U232AM). 154 154 */ 155 155 156 - enum ftdi_chip_type { 157 - SIO = 1, 158 - FT8U232AM = 2, 159 - FT232BM = 3, 160 - FT2232C = 4, 161 - FT232RL = 5, 162 - FT2232H = 6, 163 - FT4232H = 7, 164 - FT232H = 8, 165 - FTX = 9, 166 - }; 167 - 168 156 enum ftdi_sio_baudrate { 169 157 ftdi_sio_b300 = 0, 170 158 ftdi_sio_b600 = 1,