All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Johan Hovold <johan@kernel.org>
Cc: Amireddy mallikarjuna reddy <mallikarjuna.reddy@ftdichip.com>,
	arun.pappan@ftdichip.com, sowjanya.reddy@ftdichip.com,
	malliamireddy009@gmail.com, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 02/12] USB: serial: ftdi_sio: drop redundant chip type comments
Date: Sun, 11 Sep 2022 16:02:06 +0200	[thread overview]
Message-ID: <20220911140216.30481-3-johan@kernel.org> (raw)
In-Reply-To: <20220911140216.30481-1-johan@kernel.org>

Drop redundant chip type comments.

Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/usb/serial/ftdi_sio.c | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 3757931284cb..4b432707d75b 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -61,7 +61,6 @@ enum ftdi_chip_type {
 
 struct ftdi_private {
 	enum ftdi_chip_type chip_type;
-				/* type of device, either SIO or FT8U232AM */
 	int baud_base;		/* baud base clock for divisor setting */
 	int custom_divisor;	/* custom_divisor kludge, this is for
 				   baud_base (different from what goes to the
@@ -1318,7 +1317,7 @@ static u32 get_ftdi_divisor(struct tty_struct *tty,
 	if (!baud)
 		baud = 9600;
 	switch (priv->chip_type) {
-	case SIO: /* SIO chip */
+	case SIO:
 		switch (baud) {
 		case 300: div_value = ftdi_sio_b300; break;
 		case 600: div_value = ftdi_sio_b600; break;
@@ -1339,7 +1338,7 @@ static u32 get_ftdi_divisor(struct tty_struct *tty,
 			div_okay = 0;
 		}
 		break;
-	case FT8U232AM: /* 8U232AM chip */
+	case FT8U232AM:
 		if (baud <= 3000000) {
 			div_value = ftdi_232am_baud_to_divisor(baud);
 		} else {
@@ -1349,10 +1348,10 @@ static u32 get_ftdi_divisor(struct tty_struct *tty,
 			div_okay = 0;
 		}
 		break;
-	case FT232BM: /* FT232BM chip */
-	case FT2232C: /* FT2232C chip */
-	case FT232RL: /* FT232RL chip */
-	case FTX:     /* FT-X series */
+	case FT232BM:
+	case FT2232C:
+	case FT232RL:
+	case FTX:
 		if (baud <= 3000000) {
 			u16 product_id = le16_to_cpu(
 				port->serial->dev->descriptor.idProduct);
@@ -1372,9 +1371,9 @@ static u32 get_ftdi_divisor(struct tty_struct *tty,
 			baud = 9600;
 		}
 		break;
-	case FT2232H: /* FT2232H chip */
-	case FT4232H: /* FT4232H chip */
-	case FT232H:  /* FT232H chip */
+	case FT2232H:
+	case FT4232H:
+	case FT232H:
 		if ((baud <= 12000000) && (baud >= 1200)) {
 			div_value = ftdi_2232h_baud_to_divisor(baud);
 		} else if (baud < 1200) {
@@ -1386,7 +1385,7 @@ static u32 get_ftdi_divisor(struct tty_struct *tty,
 			baud = 9600;
 		}
 		break;
-	} /* priv->chip_type */
+	}
 
 	if (div_okay) {
 		dev_dbg(dev, "%s - Baud rate set to %d (divisor 0x%lX) on chip %s\n",
-- 
2.35.1


  parent reply	other threads:[~2022-09-11 14:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-11 14:02 [PATCH 00/12] USB: serial: ftdi_sio: type cleanup and HP/HA support Johan Hovold
2022-09-11 14:02 ` [PATCH 01/12] USB: serial: ftdi_sio: clean up chip type enum Johan Hovold
2022-09-11 14:02 ` Johan Hovold [this message]
2022-09-11 14:02 ` [PATCH 03/12] USB: serial: ftdi_sio: rename chip types Johan Hovold
2022-09-11 14:02 ` [PATCH 04/12] USB: serial: ftdi_sio: include FT2232D in type string Johan Hovold
2022-09-11 14:02 ` [PATCH 05/12] USB: serial: ftdi_sio: rename channel index Johan Hovold
2022-09-11 14:02 ` [PATCH 06/12] USB: serial: ftdi_sio: tighten device-type detection Johan Hovold
2022-09-11 14:02 ` [PATCH 07/12] USB: serial: ftdi_sio: clean up modem-status handling Johan Hovold
2022-09-11 14:02 ` [PATCH 08/12] USB: serial: ftdi_sio: clean up attribute handling Johan Hovold
2022-09-11 14:02 ` [PATCH 09/12] USB: serial: ftdi_sio: clean up baudrate request Johan Hovold
2022-09-11 14:02 ` [PATCH 10/12] USB: serial: ftdi_sio: assume hi-speed type Johan Hovold
2022-09-11 14:02 ` [PATCH 11/12] USB: serial: ftdi_sio: simplify divisor handling Johan Hovold
2022-09-11 14:02 ` [PATCH 12/12] USB: serial: ftdi_sio: add support for HP and HA devices Johan Hovold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220911140216.30481-3-johan@kernel.org \
    --to=johan@kernel.org \
    --cc=arun.pappan@ftdichip.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=malliamireddy009@gmail.com \
    --cc=mallikarjuna.reddy@ftdichip.com \
    --cc=sowjanya.reddy@ftdichip.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.