]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
USB: serial: cp210x: clean up CSIZE handling
authorJohan Hovold <johan@kernel.org>
Wed, 19 Oct 2016 13:46:38 +0000 (15:46 +0200)
committerJohan Hovold <johan@kernel.org>
Mon, 24 Oct 2016 10:00:19 +0000 (12:00 +0200)
CSIZE is two-bit wide and only CS5 through CS8 are possible values.

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

index 54a4de0efdbaa48fa7e1a49672e114657737b42d..66e0950215121b4f9ffb83255d24e709b579bb13 100644 (file)
@@ -929,16 +929,9 @@ static void cp210x_set_termios(struct tty_struct *tty,
                        dev_dbg(dev, "%s - data bits = 7\n", __func__);
                        break;
                case CS8:
-                       bits |= BITS_DATA_8;
-                       dev_dbg(dev, "%s - data bits = 8\n", __func__);
-                       break;
-               /*case CS9:
-                       bits |= BITS_DATA_9;
-                       dev_dbg(dev, "%s - data bits = 9\n", __func__);
-                       break;*/
                default:
-                       dev_dbg(dev, "cp210x driver does not support the number of bits requested, using 8 bit mode\n");
                        bits |= BITS_DATA_8;
+                       dev_dbg(dev, "%s - data bits = 8\n", __func__);
                        break;
                }
                if (cp210x_write_u16_reg(port, CP210X_SET_LINE_CTL, bits))