lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220911140216.30481-2-johan@kernel.org>
Date:   Sun, 11 Sep 2022 16:02:05 +0200
From:   Johan Hovold <johan@...nel.org>
To:     Johan Hovold <johan@...nel.org>
Cc:     Amireddy mallikarjuna reddy <mallikarjuna.reddy@...ichip.com>,
        arun.pappan@...ichip.com, sowjanya.reddy@...ichip.com,
        malliamireddy009@...il.com, linux-usb@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH 01/12] 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@...nel.org>
---
 drivers/usb/serial/ftdi_sio.c | 11 +++++++++++
 drivers/usb/serial/ftdi_sio.h | 12 ------------
 2 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 52d59be92034..3757931284cb 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -47,6 +47,17 @@
 #define DRIVER_AUTHOR "Greg Kroah-Hartman <greg@...ah.com>, Bill Ryder <bryder@....com>, Kuba Ober <kuba@...eimbrium.org>, Andreas Mohr, Johan Hovold <jhovold@...il.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;
diff --git a/drivers/usb/serial/ftdi_sio.h b/drivers/usb/serial/ftdi_sio.h
index be1641e0408b..12bc3a82ac2c 100644
--- a/drivers/usb/serial/ftdi_sio.h
+++ b/drivers/usb/serial/ftdi_sio.h
@@ -153,18 +153,6 @@
  * 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,
-- 
2.35.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ